const char * |
string contains name of OS; editing not allowed |
---|
Returns OS name.
Struct contains separate for COMiC instances OS dependent data needs for using OS API.
Defined in _os.h
by implementation libs.
int |
0 on success and any other value on fail |
---|
Inits global OS dependent data.
COMiC_bool |
0 on true otherwise non-zero value |
---|
Check if global OS dependent data is inited.
void |
no return |
---|---|
COMiC_OS * |
pointer to storage allocated for os dependent data; must be not-null |
Finalize global OS dependent data.
void |
no return |
---|
Releases global mutex after accessing OS dependent data.
void |
no return |
---|
Inits OS dependent data for COMiC instance.
void |
no return |
---|
Finalize OS dependent data in COMiC instance.
void |
no return |
---|
Acquires global mutex for accessing OS dependent data.
type | name | comment |
---|---|---|
COMiC_int16 |
year | |
COMiC_uint8 |
month | |
COMiC_uint8 |
day | |
COMiC_uint8 |
hour | |
COMiC_uint8 |
minute | |
COMiC_uint8 |
second | |
COMiC_uint16 |
milliseconds |
Structure represents time
COMiC_OS_Time |
structure represents time |
---|
Returns current global time.
Struct contains OS dependent data needs for thread.
Defined in _os.h
by implementation libs.
int |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
void *(*func)(void *data) |
pointer to function that will run in thread; must be not-null |
void *data |
pointer that will be passed to func ; may be null |
Creates thread that will run func
.
Paused after creation, resume needed.
int |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
Pauses thread.
int |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
Resumes thread.
int |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
COMiC_uint32 |
milliseconds to waits |
Waits not greater then millisecinds
(if > 0) to thread ended.
int |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
Kills thread (but not destroys).
void |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
Unregisters and destroys thread.
int |
0 on success and any other value on fail |
---|---|
COMiC_OS * |
pointer to OS instance |
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
Registers invoker thread.
void |
0 on success and any other value on fail |
---|---|
COMiC_OS_Thread * |
pointer to storage allocated for thread os dependent data; must be not-null |
Unregisters thread.
COMiC_OS_Thread * |
returns pointer to thread storage or NULL if it is not registered |
---|
Returns invoker thread if it is registered.
type | name | comment |
---|---|---|
const char * |
message | |
voif (*)(char *) |
deallocator | used to free message if it is in dynamic buffer |
Structure for storing errors.
void |
no return |
---|---|
const char * |
error message |
Sets error.
void |
no return |
---|---|
COMiC_Error * |
error storage |
const char * |
error message |
Sets error to specified storage.
void |
no return |
---|---|
void (*)(char *) |
deallocator |
const char * |
error message |
Sets error with deallocator to free message string.
void |
no return |
---|---|
COMiC_Error * |
error storage |
void (*)(char *) |
deallocator |
const char * |
error message |
Sets error to specified storage.
const char * |
error message or NULL if not set |
---|
Returns current error message or if set.
const char * |
error message or NULL if not set |
---|---|
COMiC_Error * |
error storage |
Returns current error message from specified storage if set.
void |
no return |
---|
Clears error message.
void |
no return |
---|---|
COMiC_Error * |
error storage |
Clears error message in specified storage.
void * |
pointer to allocated buffer |
---|---|
COMiC_size |
buffer size |
Allocates buffer in local heap.
void * |
pointer to allocated buffer |
---|---|
COMiC_size |
elems count |
COMiC_size |
elem size |
Allocates buffer in local heap.
void * |
pointer to allocated buffer |
---|---|
void * |
pointer to buffer to realloc |
COMiC_size |
new buffer size |
Reallocates buffer in local heap.
void * |
pointer to allocated buffer |
---|---|
void * |
pointer to buffer to realloc |
COMiC_size |
elems count |
COMiC_size |
elem size |
Reallocates buffer in local heap.
void |
no return |
---|---|
void * |
pointer to buffer to realloc |
Deallocates buffer in local heap.
int |
0 on success and any other value on fail |
---|---|
COMiC_Lock * |
pointer to mutex storage |
Inits mutex in specified storage.
int |
0 on success and any other value on fail |
---|---|
COMiC_Lock * |
pointer to mutex storage |
Tries to acquire mutex.
void |
no return |
---|---|
COMiC_Lock * |
pointer to mutex storage |
Releases mutex.
void |
no return |
---|---|
COMiC_Lock * |
pointer to mutex storage |
Destroys mutex.