source: src/libcfa/concurrency/kernel_private.h @ 7b13aeb

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 7b13aeb was fa21ac9, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Added alarm list to the system processor in the kernel

  • Property mode set to 100644
File size: 1.9 KB
RevLine 
[75f3522]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//
[75a17f1]8// kernel_private.h --
[75f3522]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"
[75a17f1]21#include "thread"
[75f3522]22
[fa21ac9]23#include "alarm.h"
24
[75f3522]25//-----------------------------------------------------------------------------
26// Scheduler
[348006f]27void ScheduleThread( thread_desc * );
28thread_desc * nextThread(cluster * this);
[75f3522]29
[0c78741]30void ScheduleInternal(void);
[db6f06a]31void ScheduleInternal(spinlock * lock);
[348006f]32void ScheduleInternal(thread_desc * thrd);
33void ScheduleInternal(spinlock * lock, thread_desc * thrd);
[0c78741]34void ScheduleInternal(spinlock ** locks, unsigned short count);
35void ScheduleInternal(spinlock ** locks, unsigned short count, thread_desc ** thrds, unsigned short thrd_count);
[db6f06a]36
[75f3522]37//-----------------------------------------------------------------------------
38// Processor
[fa21ac9]39coroutine processorCtx_t {
[75f3522]40        processor * proc;
41};
42
43void main(processorCtx_t *);
[db6f06a]44void start(processor * this);
[348006f]45void runThread(processor * this, thread_desc * dst);
[db6f06a]46void finishRunning(processor * this);
[75f3522]47void spin(processor * this, unsigned int * spin_count);
48
[fa21ac9]49struct system_proc_t {
50        processor proc;
51
52        alarm_list_t alarms;
53        spinlock alarm_lock;
54};
55
56extern cluster * systemCluster;
57extern system_proc_t * systemProcessor;
58
[75f3522]59//-----------------------------------------------------------------------------
60// Threads
61extern "C" {
62      forall(dtype T | is_thread(T))
63      void CtxInvokeThread(T * this);
64}
65
[c3acb841]66extern void ThreadCtxSwitch(coroutine_desc * src, coroutine_desc * dst);
[75f3522]67
68#endif //KERNEL_PRIVATE_H
69
70// Local Variables: //
71// mode: c //
72// tab-width: 4 //
73// End: //
Note: See TracBrowser for help on using the repository browser.