Changeset 15030
- Timestamp:
- Sep 25, 2007, 6:10:12 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/gprint.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/gprint.c
r10667 r15030 30 30 static int Nstreams = 0; 31 31 32 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; 33 32 34 void gprintInit () { 33 35 … … 36 38 37 39 /* need to use a mutex to prevent two threads from initing simultaneously */ 40 pthread_mutex_lock (&mutex); 41 38 42 if (streams == NULL) { 39 43 Nstreams = 2; … … 66 70 streams[N].mode = GP_FILE; 67 71 streams[N].thread = id; 72 73 pthread_mutex_unlock (&mutex); 68 74 } 69 75
Note:
See TracChangeset
for help on using the changeset viewer.
