Ignore:
Timestamp:
Nov 20, 2017, 12:12:34 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
fdd3786
Parents:
b7f8cb44
Message:

Added generic containers for runtime.
Moved some internal code to bits folder.
consistently used cforall instead of CFORALL define.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/kernel

    rb7f8cb44 r0cf5b79  
    2626//-----------------------------------------------------------------------------
    2727// Locks
    28 // // Lock the spinlock, spin if already acquired
    29 // void lock      ( spinlock * DEBUG_CTX_PARAM2 );
    30 
    31 // // Lock the spinlock, yield repeatedly if already acquired
    32 // void lock_yield( spinlock * DEBUG_CTX_PARAM2 );
    33 
    34 // // Lock the spinlock, return false if already acquired
    35 // bool try_lock  ( spinlock * DEBUG_CTX_PARAM2 );
    36 
    37 // // Unlock the spinlock
    38 // void unlock    ( spinlock * );
    39 
    4028struct semaphore {
    4129        __spinlock_t lock;
    4230        int count;
    43         __thread_queue_t waiting;
     31        __queue_t(thread_desc) waiting;
    4432};
    4533
     
    5745
    5846        // Ready queue for threads
    59         __thread_queue_t ready_queue;
     47        __queue_t(thread_desc) ready_queue;
    6048
    6149        // Preemption rate on this cluster
Note: See TracChangeset for help on using the changeset viewer.