Navigation



Ignore:
Timestamp:
Jul 29, 2010, 4:11:12 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Small hack which might spear some concurrency problems and is quite harmless

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfreeDiameter.h

    r453 r454  
    569569}
    570570
     571/* Force flushing the cache of a CPU before reading a shared memory area (use only for atomic reads such as int and void*) */
     572extern 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
    571579/*************
    572580 Cancelation cleanup handlers for common objects
Note: See TracChangeset for help on using the changeset viewer.