Imagine has full thread supprot that lets you create threads and thread safe Mutex locks.
void *imagine_mutex_create();Description: Creates a Mutex. Mutex locks are unlocked when created.
void imagine_mutex_lock(void *mutex);Description: Lock a mutex. If the lock is already locked, the thread will wait on the lock until the lock is unlocked so that it can lock it
boolean imagine_mutex_lock_try(void *mutex);Description: The thread will atempt to lock the thread, if the lock is already locked if will returne FALSE and fail, If is is not locked, it will lock the mutex and return TRUE
void imagine_mutex_unlock(void *mutex);Description: Un locks the Mutex
void imagine_mutex_destroy(void *mutex);Description: Destroys the mutex
void *imagine_signal_create();Description: Creates a signal bocker
void *magine_signal_destroy(void *signal);Description: Destroys a signal blocker
boolean imagine_signal_wait(void *signal);Description: Sets a thread to wait on the blocker for another thread to a activate it.
boolean imagine_signal_activate(void *signal);Description: Activates the blocker so that one or more threads waiting on the signal will be released
void imagine_thread(void (*func)(void *data), void *data);Description: launches a thread that will execute the function pointer. The void pointer will be given as i parameter. Onec the function returns the thread will be deleted.