Ignore:
Timestamp:
Nov 1, 2005 9:46:17 PM (17 years ago)
Author:
bennylp
Message:

Changed atomic interface and fixed bugs in echo test client

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/main/pjlib/src/pj/os_core_linux_kernel.c

    r4 r5  
    416416PJ_DEF(pj_status_t) pj_atomic_destroy( pj_atomic_t *var ) 
    417417{ 
    418     return 0; 
    419 } 
    420  
    421 PJ_DEF(pj_atomic_value_t) pj_atomic_set(pj_atomic_t *var,  
    422                                         pj_atomic_value_t value) 
    423 { 
    424     pj_atomic_value_t oldval = atomic_read(&var->atom); 
     418    return PJ_SUCCESS; 
     419} 
     420 
     421PJ_DEF(void) pj_atomic_set(pj_atomic_t *var, pj_atomic_value_t value) 
     422{ 
    425423    atomic_set(&var->atom, value); 
    426     return oldval; 
    427424} 
    428425 
     
    432429} 
    433430 
    434 PJ_DEF(pj_atomic_value_t) pj_atomic_inc(pj_atomic_t *var) 
     431PJ_DEF(void) pj_atomic_inc(pj_atomic_t *var) 
    435432{ 
    436433    atomic_inc(&var->atom); 
    437     return atomic_read(&var->atom); 
    438 } 
    439  
    440 PJ_DEF(pj_atomic_value_t) pj_atomic_dec(pj_atomic_t *var) 
     434} 
     435 
     436PJ_DEF(void) pj_atomic_dec(pj_atomic_t *var) 
    441437{ 
    442438    atomic_dec(&var->atom); 
    443     return atomic_read(&var->atom); 
    444 } 
    445  
     439} 
     440 
     441PJ_DEF(void) pj_atomic_add( pj_atomic_t *var, pj_atomic_value_t value ) 
     442{ 
     443    atomic_add(value, &var->atom); 
     444} 
    446445 
    447446 
Note: See TracChangeset for help on using the changeset viewer.