Ignore:
Timestamp:
Feb 25, 2020, 1:17:33 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
7dc2e015
Parents:
9fb8f01 (diff), dd9e1ca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

resolve conflict

File:
1 edited

Legend:

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

    r9fb8f01 r3d5701e  
    1010// Created On       : Mon Feb 13 12:27:26 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 29 14:06:40 2018
    13 // Update Count     : 3
     12// Last Modified On : Sat Nov 30 19:25:02 2019
     13// Update Count     : 8
    1414//
    1515
     
    3131}
    3232
    33 void ScheduleThread( thread_desc * );
    34 static inline void WakeThread( thread_desc * thrd ) {
    35         if( !thrd ) return;
    36 
    37         disable_interrupts();
    38         ScheduleThread( thrd );
    39         enable_interrupts( __cfaabi_dbg_ctx );
    40 }
    41 thread_desc * nextThread(cluster * this);
     33void __schedule_thread( $thread * ) __attribute__((nonnull (1)));
    4234
    4335//Block current thread and release/wake-up the following resources
    44 void BlockInternal(void);
    45 void BlockInternal(__spinlock_t * lock);
    46 void BlockInternal(thread_desc * thrd);
    47 void BlockInternal(__spinlock_t * lock, thread_desc * thrd);
    48 void BlockInternal(__spinlock_t * locks [], unsigned short count);
    49 void BlockInternal(__spinlock_t * locks [], unsigned short count, thread_desc * thrds [], unsigned short thrd_count);
    50 void BlockInternal(__finish_callback_fptr_t callback);
    51 void LeaveThread(__spinlock_t * lock, thread_desc * thrd);
     36void __leave_thread() __attribute__((noreturn));
    5237
    5338//-----------------------------------------------------------------------------
    5439// Processor
    5540void main(processorCtx_t *);
     41
     42void * __create_pthread( pthread_t *, void * (*)(void *), void * );
    5643
    5744static inline void wake_fast(processor * this) {
     
    8471// Threads
    8572extern "C" {
    86       forall(dtype T | is_thread(T))
    87       void CtxInvokeThread(T * this);
     73      void __cfactx_invoke_thread(void (*main)(void *), void * this);
    8874}
    8975
    90 extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst);
    91 
    9276__cfaabi_dbg_debug_do(
    93         extern void __cfaabi_dbg_thread_register  ( thread_desc * thrd );
    94         extern void __cfaabi_dbg_thread_unregister( thread_desc * thrd );
     77        extern void __cfaabi_dbg_thread_register  ( $thread * thrd );
     78        extern void __cfaabi_dbg_thread_unregister( $thread * thrd );
    9579)
    9680
     
    9983#define KERNEL_STORAGE(T,X) static char storage_##X[sizeof(T)]
    10084
     85static inline uint32_t __tls_rand() {
     86        kernelTLS.rand_seed ^= kernelTLS.rand_seed << 6;
     87        kernelTLS.rand_seed ^= kernelTLS.rand_seed >> 21;
     88        kernelTLS.rand_seed ^= kernelTLS.rand_seed << 7;
     89        return kernelTLS.rand_seed;
     90}
     91
    10192
    10293void doregister( struct cluster & cltr );
    10394void unregister( struct cluster & cltr );
    10495
    105 void doregister( struct cluster * cltr, struct thread_desc & thrd );
    106 void unregister( struct cluster * cltr, struct thread_desc & thrd );
     96void doregister( struct cluster * cltr, struct $thread & thrd );
     97void unregister( struct cluster * cltr, struct $thread & thrd );
    10798
    10899void doregister( struct cluster * cltr, struct processor * proc );
Note: See TracChangeset for help on using the changeset viewer.