Ignore:
File:
1 edited

Legend:

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

    rac2b598 r09f357ec  
    3131}
    3232
    33 void __schedule_thread( $thread * ) __attribute__((nonnull (1)));
     33void ScheduleThread( thread_desc * );
     34static inline void WakeThread( thread_desc * thrd ) {
     35        if( !thrd ) return;
     36
     37        verify(thrd->state == Inactive);
     38
     39        disable_interrupts();
     40        ScheduleThread( thrd );
     41        enable_interrupts( __cfaabi_dbg_ctx );
     42}
     43thread_desc * nextThread(cluster * this);
    3444
    3545//Block current thread and release/wake-up the following resources
    36 void __leave_thread() __attribute__((noreturn));
     46void BlockInternal(void);
     47void BlockInternal(__spinlock_t * lock);
     48void BlockInternal(thread_desc * thrd);
     49void BlockInternal(__spinlock_t * lock, thread_desc * thrd);
     50void BlockInternal(__spinlock_t * locks [], unsigned short count);
     51void BlockInternal(__spinlock_t * locks [], unsigned short count, thread_desc * thrds [], unsigned short thrd_count);
     52void BlockInternal(__finish_callback_fptr_t callback);
     53void LeaveThread(__spinlock_t * lock, thread_desc * thrd);
    3754
    3855//-----------------------------------------------------------------------------
     
    4057void main(processorCtx_t *);
    4158
    42 void * __create_pthread( pthread_t *, void * (*)(void *), void * );
     59void * create_pthread( pthread_t *, void * (*)(void *), void * );
    4360
    4461static inline void wake_fast(processor * this) {
     
    7188// Threads
    7289extern "C" {
    73       void __cfactx_invoke_thread(void (*main)(void *), void * this);
     90      void CtxInvokeThread(void (*main)(void *), void * this);
    7491}
    7592
     93extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst);
     94
    7695__cfaabi_dbg_debug_do(
    77         extern void __cfaabi_dbg_thread_register  ( $thread * thrd );
    78         extern void __cfaabi_dbg_thread_unregister( $thread * thrd );
     96        extern void __cfaabi_dbg_thread_register  ( thread_desc * thrd );
     97        extern void __cfaabi_dbg_thread_unregister( thread_desc * thrd );
    7998)
    8099
     
    83102#define KERNEL_STORAGE(T,X) static char storage_##X[sizeof(T)]
    84103
    85 static inline uint32_t __tls_rand() {
     104static inline uint32_t tls_rand() {
    86105        kernelTLS.rand_seed ^= kernelTLS.rand_seed << 6;
    87106        kernelTLS.rand_seed ^= kernelTLS.rand_seed >> 21;
     
    94113void unregister( struct cluster & cltr );
    95114
    96 void doregister( struct cluster * cltr, struct $thread & thrd );
    97 void unregister( struct cluster * cltr, struct $thread & thrd );
     115void doregister( struct cluster * cltr, struct thread_desc & thrd );
     116void unregister( struct cluster * cltr, struct thread_desc & thrd );
    98117
    99118void doregister( struct cluster * cltr, struct processor * proc );
Note: See TracChangeset for help on using the changeset viewer.