Ignore:
Timestamp:
Nov 6, 2005 9:37:47 AM (18 years ago)
Author:
bennylp
Message:

Changed ioqueue to allow simultaneous operations on the same key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/main/pjlib/src/pjlib-test/atomic.c

    r6 r11  
    5050 
    5151    /* increment. */ 
    52     if (pj_atomic_inc(atomic_var) != 112) 
     52    pj_atomic_inc(atomic_var); 
     53    if (pj_atomic_get(atomic_var) != 112) 
    5354        return -40; 
    5455 
    5556    /* decrement. */ 
    56     if (pj_atomic_dec(atomic_var) != 111) 
     57    pj_atomic_dec(atomic_var); 
     58    if (pj_atomic_get(atomic_var) != 111) 
    5759        return -50; 
    5860 
    5961    /* set */ 
    60     if (pj_atomic_set(atomic_var, 211) != 111) 
     62    pj_atomic_set(atomic_var, 211); 
     63    if (pj_atomic_get(atomic_var) != 211) 
     64        return -60; 
     65 
     66    /* add */ 
     67    pj_atomic_add(atomic_var, 10); 
     68    if (pj_atomic_get(atomic_var) != 221) 
    6169        return -60; 
    6270 
    6371    /* check the value again. */ 
    64     if (pj_atomic_get(atomic_var) != 211) 
     72    if (pj_atomic_get(atomic_var) != 221) 
    6573        return -70; 
    6674 
Note: See TracChangeset for help on using the changeset viewer.