source: src/libcfa/concurrency/kernel_private.h @ 75f3522

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 75f3522 was 75f3522, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Moved several declarations to a new private header and made some clean-up

  • Property mode set to 100644
File size: 1.4 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// threads --
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 "threads"
22
23//-----------------------------------------------------------------------------
24// Scheduler
25void ScheduleThread( thread * );
26void ScheduleInternal();
27thread * nextThread(cluster * this);
28
29//-----------------------------------------------------------------------------
30// Processor
31struct processorCtx_t {
32        processor * proc;
33        coroutine c;
34};
35
36DECL_COROUTINE(processorCtx_t);
37
38void main(processorCtx_t *);
39void runThread(processor * this, thread * dst);
40void finishRunning(processor * this, thread * thrd);
41void spin(processor * this, unsigned int * spin_count);
42
43//-----------------------------------------------------------------------------
44// Threads
45extern "C" {
46      forall(dtype T | is_thread(T))
47      void CtxInvokeThread(T * this);
48}
49
50extern void ThreadCtxSwitch(coroutine * src, coroutine * dst);
51
52#endif //KERNEL_PRIVATE_H
53
54// Local Variables: //
55// mode: c //
56// tab-width: 4 //
57// End: //
Note: See TracBrowser for help on using the repository browser.