Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    rcc7f4b1 r51f3798  
    2121#include "invoke.h"
    2222
    23 struct __monitor_t {
     23struct monitor {
    2424        spinlock lock;
    25         thread * owner;
     25        thread * holder;
    2626        simple_thread_list entry_queue;
    27         unsigned int recursion;
    2827};
    2928
    30 static inline void ?{}(__monitor_t * this) {
    31         this->owner = 0;
    32         this->recursion = 0;
    33 }
     29void enter(monitor *);
     30void leave(monitor *);
    3431
    35 void enter(__monitor_t *);
    36 void leave(__monitor_t *);
    37 
    38 struct monitor_guard_t {
    39         __monitor_t * m;
     32struct monitor_guard {
     33        monitor * m;
    4034};
    4135
    42 static inline void ?{}( monitor_guard_t * this, __monitor_t * m ) {
     36static inline void ?{}( monitor_guard * this, monitor * m ) {
    4337        this->m = m;
    4438        enter( this->m );
    4539}
    4640
    47 static inline void ^?{}( monitor_guard_t * this ) {
     41static inline void ^?{}( monitor_guard * this ) {
    4842        leave( this->m );
    4943}
Note: See TracChangeset for help on using the changeset viewer.