home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
f
/
ftp-102.zip
/
ftape-1.02
/
driver
/
thread.h
< prev
next >
Wrap
Text File
|
1992-10-12
|
1KB
|
55 lines
/* Declarations for lightweight threads.
Copyright (C) 1992 David L. Brown, Jr.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/*
* thread.h,v 1.3 1992/10/13 01:45:04 dbrown Exp
*
* thread.h,v
* Revision 1.3 1992/10/13 01:45:04 dbrown
* Added FSF copyright.
*
* Revision 1.2 1992/09/07 16:44:04 dbrown
* Changed names of routines for Kernel use.
*
* Revision 1.1 1992/09/07 14:46:26 dbrown
* Added thread code.
*
*/
/* Handle a distinct thread. */
typedef struct {
long bx, si, di;
void *bp;
void *sp;
void *pc;
} thread_state;
typedef struct {
long *stack;
thread_state master;
thread_state slave;
} thread;
typedef void func ();
int th_create (thread *th, int stack_size,
void *stack,
func *function, void *arg);
void *th_thunk (thread *th, void *arg);
void *th_suspend (thread *th, void *arg);