summaryrefslogtreecommitdiff
path: root/ot_mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_mutex.c')
-rw-r--r--ot_mutex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ot_mutex.c b/ot_mutex.c
index fb24fe7..a7b583b 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -1,6 +1,6 @@
1/* This software was written by Dirk Engling <erdgeist@erdgeist.org> 1/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
2 It is considered beerware. Prost. Skol. Cheers or whatever. 2 It is considered beerware. Prost. Skol. Cheers or whatever.
3 3
4 $id$ */ 4 $id$ */
5 5
6/* System */ 6/* System */
@@ -93,7 +93,7 @@ void mutex_bucket_unlock( int bucket ) {
93 bucket_remove( bucket ); 93 bucket_remove( bucket );
94 pthread_cond_broadcast( &bucket_being_unlocked ); 94 pthread_cond_broadcast( &bucket_being_unlocked );
95 pthread_mutex_unlock( &bucket_mutex ); 95 pthread_mutex_unlock( &bucket_mutex );
96} 96}
97 97
98void mutex_bucket_unlock_by_hash( ot_hash *hash ) { 98void mutex_bucket_unlock_by_hash( ot_hash *hash ) {
99 unsigned char *local_hash = hash[0]; 99 unsigned char *local_hash = hash[0];
@@ -134,7 +134,7 @@ int mutex_workqueue_pushtask( int64 socket, ot_tasktype tasktype ) {
134 } 134 }
135 135
136 /* Skip to end of list */ 136 /* Skip to end of list */
137 tmptask = &tasklist; 137 tmptask = &tasklist;
138 while( *tmptask ) 138 while( *tmptask )
139 tmptask = &(*tmptask)->next; 139 tmptask = &(*tmptask)->next;
140 *tmptask = task; 140 *tmptask = task;
@@ -267,7 +267,7 @@ int mutex_workqueue_pushresult( ot_taskid taskid, int iovec_entries, struct iove
267 MTX_DBG( "pushresult unlocks.\n" ); 267 MTX_DBG( "pushresult unlocks.\n" );
268 pthread_mutex_unlock( &tasklist_mutex ); 268 pthread_mutex_unlock( &tasklist_mutex );
269 MTX_DBG( "pushresult unlocked.\n" ); 269 MTX_DBG( "pushresult unlocked.\n" );
270 270
271 /* Indicate whether the worker has to throw away results */ 271 /* Indicate whether the worker has to throw away results */
272 return task ? 0 : -1; 272 return task ? 0 : -1;
273} 273}
@@ -291,7 +291,7 @@ int64 mutex_workqueue_popresult( int *iovec_entries, struct iovec ** iovec ) {
291 *iovec_entries = (*task)->iovec_entries; 291 *iovec_entries = (*task)->iovec_entries;
292 *iovec = (*task)->iovec; 292 *iovec = (*task)->iovec;
293 socket = (*task)->socket; 293 socket = (*task)->socket;
294 294
295 *task = (*task)->next; 295 *task = (*task)->next;
296 free( ptask ); 296 free( ptask );
297 } 297 }