Browse code

-.minor updates

Andrei Pelinescu-Onciul authored on 17/03/2003 18:41:27
Showing 1 changed files
... ...
@@ -123,6 +123,12 @@ if (lock_set_init(lock_set)==0){
123 123
    goto error;
124 124
 }
125 125
 
126
+or
127
+ if ((lock_set=lock_set_alloc(100))==0) || (lock_set_init(lock_set)==0)){
128
+   if (lock_set) lock_set_dealloc(lock_set);
129
+   goto error;
130
+ }
131
+
126 132
 
127 133
 Destroying & deallocating:
128 134
 --------------------------
... ...
@@ -145,3 +151,8 @@ lock_set_get(lock_set, 2);
145 151
 lock_set_release(lock_set, 2);
146 152
 
147 153
 
154
+When to use lock_set_t & when to use gen_lock_t
155
+-----------------------------------------------
156
+If you use lots of semaphores and GEN_LOCK_T_PREFERED is undefined then use
157
+ lock_set_t. If GEN_LOCK_T_PREFERED is defined you can safely use gen_lock_t 
158
+ arrays instead.