Changeset 445 for trunk/libs/libpthread/pthread.c
- Timestamp:
- May 29, 2018, 9:27:23 AM (6 years ago)
- Location:
- trunk/libs/libpthread
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/libpthread/pthread.c
r444 r445 1 1 /* 2 * pthread.c - User side pthread related functionsimplementation.2 * pthread.c - User leve <pthread> library implementation. 3 3 * 4 4 * Author Alain Greiner (2016,2017,2018) … … 23 23 24 24 #include <hal_user.h> 25 #include <hal_types.h> 25 26 #include <stdio.h> 26 27 #include <stdlib.h> 27 28 #include <pthread.h> 28 #include <assert.h> 29 #include <almos-mkh.h> 29 #include <almosmkh.h> 30 30 #include <syscalls_numbers.h> 31 31 32 32 #define PTHREAD_MUTEX_DEBUG 0 33 33 #define PTHREAD_BARRIER_DEBUG 0 34 35 #define reg_t int36 34 37 35 //////////////////////////////////////////////////////////////////////////////////////////// … … 205 203 206 204 // check attributes 207 assert( x_size <= QDT_XMAX ); 208 assert( y_size <= QDT_YMAX ); 209 assert( x_size * y_size * nthreads == count ); 205 if( (x_size * y_size * nthreads) != count ) 206 { 207 printf("\[ERROR] in %s : count != x_size * y_size * nthreads/n", __FUNCTION__); 208 exit( EXIT_FAILURE ); 209 } 210 210 211 211 // compute SQT levels … … 319 319 else // not the last thread 320 320 { 321 // poll sense322 321 while( 1 ) 323 322 { 323 // poll sense 324 324 if( node->sense == expected ) break; 325 326 // deschedule 327 pthread_yield(); 325 328 } 326 329
Note: See TracChangeset
for help on using the changeset viewer.