Navigation


Changeset 454:f1484823cb4a in freeDiameter for freeDiameter/p_psm.c


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
  • freeDiameter/p_psm.c

    r403 r454  
    184184        TRACE_ENTRY("%p %d(%s)", peer, new_state, STATE_STR(new_state));
    185185        CHECK_PARAMS( CHECK_PEER(peer) );
     186        fd_cpu_flush_cache();
    186187        old = peer->p_hdr.info.runtime.pir_state;
    187188        if (old == new_state)
     
    194195       
    195196        peer->p_hdr.info.runtime.pir_state = new_state;
     197        fd_cpu_flush_cache();
    196198       
    197199        if (old == STATE_OPEN) {
     
    251253{
    252254        /* Move to CLOSED state: failover messages, stop OUT thread, unlink peer from active list */
     255        fd_cpu_flush_cache();
    253256        if (peer->p_hdr.info.runtime.pir_state != STATE_ZOMBIE) {
    254257                CHECK_FCT_DO( fd_psm_change_state(peer, STATE_CLOSED), /* continue */ );
     
    281284        CHECK_PARAMS_DO( CHECK_PEER(peer), return );
    282285        peer->p_hdr.info.runtime.pir_state = STATE_ZOMBIE;
     286        fd_cpu_flush_cache();
    283287        return;
    284288}
     
    306310        /* The state machine starts in CLOSED state */
    307311        peer->p_hdr.info.runtime.pir_state = STATE_CLOSED;
    308        
     312
    309313        /* Wait that the PSM are authorized to start in the daemon */
    310314        CHECK_FCT_DO( fd_psm_waitstart(), goto psm_end );
     
    709713                        peer->p_hdr.info.pi_diamid);
    710714        pthread_cleanup_pop(1); /* set STATE_ZOMBIE */
     715        fd_cpu_flush_cache();
    711716        peer->p_psm = (pthread_t)NULL;
    712717        pthread_detach(pthread_self());
     
    742747        CHECK_PARAMS( CHECK_PEER(peer) );
    743748       
     749        fd_cpu_flush_cache();
    744750        if (peer->p_hdr.info.runtime.pir_state != STATE_ZOMBIE) {
    745751                CHECK_FCT( fd_event_send(peer->p_events, FDEVP_TERMINATE, 0, reason) );
Note: See TracChangeset for help on using the changeset viewer.