Ignore:
Timestamp:
Nov 2, 2020, 12:44:43 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
58688bf, 82f791f
Parents:
f7136f7
Message:

Removed unpark and added support for unpark from the kernel (removing the distinction between the two

Location:
libcfa/src/concurrency/kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel/fwd.hfa

    rf7136f7 re873838  
    3535        extern "Cforall" {
    3636                extern __attribute__((aligned(128))) thread_local struct KernelThreadData {
    37                         struct $thread    * volatile this_thread;
    38                         struct processor  * volatile this_processor;
    39                         struct __stats_t  * volatile this_stats;
     37                        struct $thread          * volatile this_thread;
     38                        struct processor        * volatile this_processor;
     39                        struct __processor_id_t * volatile this_proc_id;
     40                        struct __stats_t        * volatile this_stats;
    4041
    4142                        struct {
  • libcfa/src/concurrency/kernel/startup.cfa

    rf7136f7 re873838  
    122122        NULL,
    123123        NULL,
     124        NULL,
    124125        { 1, false, false },
    125126};
     
    212213        //initialize the global state variables
    213214        kernelTLS.this_processor = mainProcessor;
     215        kernelTLS.this_proc_id   = (__processor_id_t*)mainProcessor;
    214216        kernelTLS.this_thread    = mainThread;
    215217
     
    227229        // Add the main thread to the ready queue
    228230        // once resume is called on mainProcessor->runner the mainThread needs to be scheduled like any normal thread
    229         __schedule_thread((__processor_id_t *)mainProcessor, mainThread);
     231        __schedule_thread(mainThread);
    230232
    231233        // SKULLDUGGERY: Force a context switch to the main processor to set the main thread's context to the current UNIX
     
    324326        processor * proc = (processor *) arg;
    325327        kernelTLS.this_processor = proc;
     328        kernelTLS.this_proc_id   = (__processor_id_t*)proc;
    326329        kernelTLS.this_thread    = 0p;
    327330        kernelTLS.preemption_state.[enabled, disable_count] = [false, 1];
Note: See TracChangeset for help on using the changeset viewer.