Navigation


Changeset 137:5510f73e1737 in freeDiameter


Ignore:
Timestamp:
Dec 16, 2009, 5:04:27 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Replace non-posix pthread_yield with posix sched_yield

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • freeDiameter/peers.c

    r86 r137  
    301301               
    302302                /* Allow the PSM(s) to execute */
    303                 pthread_yield();
     303                sched_yield();
    304304               
    305305                /* Remove zombie peers */
  • include/freeDiameter/libfreeDiameter.h

    r135 r137  
    6060
    6161#include <pthread.h>
     62#include <sched.h>
    6263#include <string.h>
    6364#include <assert.h>
  • libfreeDiameter/fifo.c

    r43 r137  
    162162                CHECK_POSIX(  pthread_cond_signal(&q->cond)  );
    163163                CHECK_POSIX(  pthread_mutex_unlock( &q->mtx ));
    164                 pthread_yield();
     164                sched_yield();
    165165                CHECK_POSIX(  pthread_mutex_lock( &q->mtx )  );
    166166                ASSERT( ++loops < 10 ); /* detect infinite loops */
     
    210210                CHECK_POSIX(  pthread_cond_signal(&old->cond)  );
    211211                CHECK_POSIX(  pthread_mutex_unlock( &old->mtx ));
    212                 pthread_yield();
     212                sched_yield();
    213213                CHECK_POSIX(  pthread_mutex_lock( &old->mtx )  );
    214214                ASSERT( ++loops < 10 ); /* detect infinite loops */
Note: See TracChangeset for help on using the changeset viewer.