ADT
        aaron-thesis
        arm-eh
        ast-experimental
        cleanup-dtors
        deferred_resn
        demangler
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        new-env
        no_list
        persistent-indexer
        pthread-emulation
        qualifiedEnum
        resolv-new
        with_gc
      
      
        
          | Last change
 on this file since f20dffa was             17af7d1, checked in by Thierry Delisle <tdelisle@…>, 9 years ago | 
        
          | 
Some clean-up of runtime code
 | 
        
          | 
              
Property                 mode
 set to                 100644 | 
        
          | File size:
            1.6 KB | 
      
      
| Line |  | 
|---|
| 1 | //                              -*- Mode: CFA -*- | 
|---|
| 2 | // | 
|---|
| 3 | // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo | 
|---|
| 4 | // | 
|---|
| 5 | // The contents of this file are covered under the licence agreement in the | 
|---|
| 6 | // file "LICENCE" distributed with Cforall. | 
|---|
| 7 | // | 
|---|
| 8 | // kernel_private.h -- | 
|---|
| 9 | // | 
|---|
| 10 | // Author           : Thierry Delisle | 
|---|
| 11 | // Created On       : Mon Feb 13 12:27:26 2017 | 
|---|
| 12 | // Last Modified By : Thierry Delisle | 
|---|
| 13 | // Last Modified On : -- | 
|---|
| 14 | // Update Count     : 0 | 
|---|
| 15 | // | 
|---|
| 16 |  | 
|---|
| 17 | #ifndef KERNEL_PRIVATE_H | 
|---|
| 18 | #define KERNEL_PRIVATE_H | 
|---|
| 19 |  | 
|---|
| 20 | #include "kernel" | 
|---|
| 21 | #include "thread" | 
|---|
| 22 |  | 
|---|
| 23 | //----------------------------------------------------------------------------- | 
|---|
| 24 | // Scheduler | 
|---|
| 25 | void ScheduleThread( thread_desc * ); | 
|---|
| 26 | thread_desc * nextThread(cluster * this); | 
|---|
| 27 |  | 
|---|
| 28 | void ScheduleInternal(); | 
|---|
| 29 | void ScheduleInternal(spinlock * lock); | 
|---|
| 30 | void ScheduleInternal(thread_desc * thrd); | 
|---|
| 31 | void ScheduleInternal(spinlock * lock, thread_desc * thrd); | 
|---|
| 32 |  | 
|---|
| 33 | //----------------------------------------------------------------------------- | 
|---|
| 34 | // Processor | 
|---|
| 35 | struct processorCtx_t { | 
|---|
| 36 | processor * proc; | 
|---|
| 37 | coroutine_desc __cor; | 
|---|
| 38 | }; | 
|---|
| 39 |  | 
|---|
| 40 | DECL_COROUTINE(processorCtx_t); | 
|---|
| 41 |  | 
|---|
| 42 | void main(processorCtx_t *); | 
|---|
| 43 | void start(processor * this); | 
|---|
| 44 | void runThread(processor * this, thread_desc * dst); | 
|---|
| 45 | void finishRunning(processor * this); | 
|---|
| 46 | void spin(processor * this, unsigned int * spin_count); | 
|---|
| 47 |  | 
|---|
| 48 | //----------------------------------------------------------------------------- | 
|---|
| 49 | // Threads | 
|---|
| 50 | extern "C" { | 
|---|
| 51 | forall(dtype T | is_thread(T)) | 
|---|
| 52 | void CtxInvokeThread(T * this); | 
|---|
| 53 | } | 
|---|
| 54 |  | 
|---|
| 55 | extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst); | 
|---|
| 56 |  | 
|---|
| 57 | #endif //KERNEL_PRIVATE_H | 
|---|
| 58 |  | 
|---|
| 59 | // Local Variables: // | 
|---|
| 60 | // mode: c // | 
|---|
| 61 | // tab-width: 4 // | 
|---|
| 62 | // End: // | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.