Some prelimary TODO's for filedescriptor.c to be fixed later
This commit is contained in:
parent
be9d2b189f
commit
9752de3102
1 changed files with 6 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ NOBUG_DEFINE_FLAG_PARENT (filedescriptor, file_all);
|
|||
This registry stores all acquired filedescriptors for lookup, they will be freed when not referenced anymore.
|
||||
*/
|
||||
static PSplay registry = NULL;
|
||||
static lumiera_mutex registry_mutex = {PTHREAD_MUTEX_INITIALIZER};
|
||||
static lumiera_mutex registry_mutex = {PTHREAD_MUTEX_INITIALIZER NOBUG_RESOURCE_HANDLE_COMMA_INITIALIZER};
|
||||
|
||||
|
||||
static int
|
||||
|
|
@ -96,7 +96,9 @@ lumiera_filedescriptor_registry_init (void)
|
|||
if (!registry)
|
||||
LUMIERA_DIE (NO_MEMORY);
|
||||
|
||||
RESOURCE_HANDLE_INIT (registry_mutex.rh);
|
||||
TODO ("LumieraMutex lumiera_mutex_init (LumieraMutex self, const char* purpose, struct nobug_flag* flag);");
|
||||
|
||||
// RESOURCE_HANDLE_INIT (registry_mutex.rh);
|
||||
RESOURCE_ANNOUNCE (filedescriptor, "mutex", "filedescriptor registry", ®istry, registry_mutex.rh);
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +110,8 @@ lumiera_filedescriptor_registry_destroy (void)
|
|||
|
||||
RESOURCE_FORGET (filedescriptor, registry_mutex.rh);
|
||||
|
||||
TODO ("LumieraMutex lumiera_mutex_destroy (LumieraMutex self, struct nobug_flag* flag);");
|
||||
|
||||
if (registry)
|
||||
psplay_destroy (registry);
|
||||
registry = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue