Changes in / [6fafda8:eaf269d]


Ignore:
Files:
2 added
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/locks.hfa

    r6fafda8 reaf269d  
    177177};
    178178
    179 static inline void ?{}(fast_lock & this) __attribute__((deprecated("use linear_backoff_then_block_lock instead")));
    180179static inline void ?{}(fast_lock & this) { this.owner = 0p; }
    181180
     
    185184}
    186185
    187 static inline void lock( fast_lock & this ) __attribute__((deprecated("use linear_backoff_then_block_lock instead"), artificial));
     186static inline void lock( fast_lock & this ) __attribute__((artificial));
    188187static inline void lock( fast_lock & this ) {
    189188        thread$ * thrd = active_thread();
     
    196195}
    197196
    198 static inline bool try_lock( fast_lock & this ) __attribute__((deprecated("use linear_backoff_then_block_lock instead"), artificial));
     197static inline bool try_lock( fast_lock & this ) __attribute__((artificial));
    199198static inline bool try_lock ( fast_lock & this ) {
    200199        thread$ * thrd = active_thread();
     
    203202}
    204203
    205 static inline thread$ * unlock( fast_lock & this ) __attribute__((deprecated("use linear_backoff_then_block_lock instead"), artificial));
     204static inline thread$ * unlock( fast_lock & this ) __attribute__((artificial));
    206205static inline thread$ * unlock( fast_lock & this ) {
    207206        /* paranoid */ verify(active_thread() == this.owner);
  • tests/unified_locking/mutex_test.hfa

    r6fafda8 reaf269d  
    1010        thread$ * id;
    1111        uint32_t sum;
    12         uint32_t cnt;
    1312};
    1413
     
    2827        {
    2928                uint32_t tsum = mo.sum;
    30                 uint32_t cnt = mo.cnt;
    3129                mo.id = me;
    3230                yield(random(5));
    3331                value = ((uint32_t)random()) ^ ((uint32_t)me);
    3432                if(mo.id != me) sout | "Intruder!";
    35                 mo.cnt = cnt + 1;
    3633                mo.sum = tsum + value;
    3734        }
     
    5754        uint32_t sum = -32;
    5855        mo.sum = -32;
    59         mo.cnt = 0;
    6056        processor p[2];
    6157        sout | "Starting";
     
    6763        }
    6864        sout | "Done!";
    69         if(mo.cnt != (13 * num_times)) sout | "Invalid cs count!" | mo.cnt | "vs "| (13 * num_times) | "(13 *" | num_times | ')';
    7065        if(sum == mo.sum) sout | "Match!";
    7166        else sout | "No Match!" | sum | "vs" | mo.sum;
Note: See TracChangeset for help on using the changeset viewer.