2021-01-23 13:49:54 +00:00
|
|
|
|
|
|
|
#include <kiwi.h>
|
|
|
|
#include <machinarium.h>
|
|
|
|
#include <odyssey.h>
|
|
|
|
|
|
|
|
od_retcode_t od_thread_global_init(od_thread_global **gl)
|
|
|
|
{
|
|
|
|
*gl = malloc(sizeof(od_thread_global));
|
2023-05-19 09:36:16 +00:00
|
|
|
if (*gl == NULL) {
|
|
|
|
return NOT_OK_RESPONSE;
|
|
|
|
}
|
2021-01-23 13:49:54 +00:00
|
|
|
|
|
|
|
od_conn_eject_info_init(&(*gl)->info);
|
|
|
|
|
|
|
|
return OK_RESPONSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
od_thread_global **od_thread_global_get(void)
|
|
|
|
{
|
|
|
|
return (od_thread_global **)machine_thread_private();
|
|
|
|
}
|
|
|
|
|
|
|
|
od_retcode_t od_thread_global_free(od_thread_global *gl)
|
|
|
|
{
|
|
|
|
od_retcode_t rc = od_conn_eject_info_free(gl->info);
|
|
|
|
|
|
|
|
if (rc != OK_RESPONSE) {
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(gl);
|
|
|
|
|
|
|
|
return OK_RESPONSE;
|
|
|
|
}
|