uThreads
0.3.0
Main Page
Classes
Files
File List
File Members
src
runtime
Stack.h
1
/*******************************************************************************
2
* Copyright © 2015, 2016 Saman Barghi
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*******************************************************************************/
17
18
#ifndef UTHREADS_STACK_H_
19
#define UTHREADS_STACK_H_
20
21
#include "../generic/basics.h"
22
// initialize stack for invocation of 'func(arg1,arg2,arg3, arg4)'
23
class
uThread
;
24
extern
"C"
vaddr stackInit(vaddr stack, ptr_t func, ptr_t arg1, ptr_t arg2, ptr_t arg3, ptr_t arg4);
25
extern
"C"
void
stackSwitch(
uThread
* nextuThread, ptr_t args, vaddr* currSP, vaddr nextSP,
void
(*func)(
uThread
*,
void
*));
26
27
28
#endif
/* UTHREADS_STACK_H_*/
uThread
user-level threads (fiber)
Definition:
uThread.h:63
Generated on Mon Nov 7 2016 02:54:32 for uThreads by
1.8.11