comparison include/freeDiameter/libfreeDiameter.h @ 454:f1484823cb4a

Small hack which might spear some concurrency problems and is quite harmless
author Sebastien Decugis <sdecugis@nict.go.jp>
date Thu, 29 Jul 2010 16:11:12 +0900
parents 9a8b3178a7a7
children 16224de837fd
comparison
equal deleted inserted replaced
453:9a8b3178a7a7 454:f1484823cb4a
566 *th = (pthread_t)NULL; 566 *th = (pthread_t)NULL;
567 567
568 return 0; 568 return 0;
569 } 569 }
570 570
571 /* Force flushing the cache of a CPU before reading a shared memory area (use only for atomic reads such as int and void*) */
572 extern pthread_mutex_t fd_cpu_mtx_dummy; /* only for the macro bellow, so that we have reasonably fresh pir_state value when needed */
573 #define fd_cpu_flush_cache() { \
574 (void)pthread_mutex_lock(&fd_cpu_mtx_dummy); \
575 (void)pthread_mutex_unlock(&fd_cpu_mtx_dummy); \
576 }
577
578
571 /************* 579 /*************
572 Cancelation cleanup handlers for common objects 580 Cancelation cleanup handlers for common objects
573 *************/ 581 *************/
574 static __inline__ void fd_cleanup_mutex( void * mutex ) 582 static __inline__ void fd_cleanup_mutex( void * mutex )
575 { 583 {
"Welcome to our mercurial repository"