Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    rcb0e6de r348006f  
    2222#include "stdlib"
    2323
     24struct monitor_desc {
     25        spinlock lock;
     26        thread_desc * owner;
     27        simple_thread_list entry_queue;
     28        unsigned int recursion;
     29};
     30
    2431static inline void ?{}(monitor_desc * this) {
    2532        this->owner = 0;
    2633        this->recursion = 0;
    2734}
     35
     36//Basic entering routine
     37void enter(monitor_desc *);
     38void leave(monitor_desc *);
    2839
    2940//Array entering routine
     
    3849static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
    3950        return ((intptr_t)lhs) < ((intptr_t)rhs);
     51}
     52
     53static inline void ?{}( monitor_guard_t * this, monitor_desc ** m ) {
     54        this->m = m;
     55        this->count = 1;
     56        enter( *this->m );
    4057}
    4158
Note: See TracChangeset for help on using the changeset viewer.