Giving threadsafety in client registry with semaphore

This commit is contained in:
Michael Jumper
2010-09-22 00:09:24 -07:00
parent 0fdcfab825
commit df066bcfb8
3 changed files with 16 additions and 2 deletions

View File

@@ -22,8 +22,9 @@
#include <png.h>
#include <uuid/uuid.h>
#include "uuidtree.h"
#include <semaphore.h>
#include "uuidtree.h"
#include "guacio.h"
/**
@@ -237,6 +238,11 @@ struct guac_client_registry {
*/
guac_uuid_tree_node* root;
/**
* Semaphore controlling access to UUID tree.
*/
sem_t tree_lock;
};
guac_client_registry* guac_create_client_registry();