forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Makefile adapted to changes below.
* split pythonmain.c in two: most stuff goes to pythonrun.c, in the library. * new optional built-in threadmodule.c, build upon Sjoerd's thread.{c,h}. * new module from Sjoerd: mmmodule.c (dynamically loaded). * new module from Sjoerd: sv (svgen.py, svmodule.c.proto). * new files thread.{c,h} (from Sjoerd). * new xxmodule.c (example only). * myselect.h: bzero -> memset * select.c: bzero -> memset; removed global variable
- Loading branch information
1 parent
4fbf798
commit 1984f1e
Showing
11 changed files
with
1,249 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef _THREAD_H_included | ||
#define _THREAD_H_included | ||
|
||
#ifdef __STDC__ | ||
#define _P(args) args | ||
#else | ||
#define _P(args) () | ||
#endif | ||
|
||
void init_thread _P((void)); | ||
int start_new_thread _P((void (*)(void *), void *)); | ||
void exit_thread _P((void)); | ||
|
||
typedef void *type_lock; | ||
|
||
type_lock allocate_lock _P((void)); | ||
void free_lock _P((type_lock)); | ||
int acquire_lock _P((type_lock, int)); | ||
#define WAIT_LOCK 1 | ||
#define NOWAIT_LOCK 0 | ||
void release_lock _P((type_lock)); | ||
|
||
void exit_prog _P((int)); | ||
|
||
#undef _P | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef _THREAD_H_included | ||
#define _THREAD_H_included | ||
|
||
#ifdef __STDC__ | ||
#define _P(args) args | ||
#else | ||
#define _P(args) () | ||
#endif | ||
|
||
void init_thread _P((void)); | ||
int start_new_thread _P((void (*)(void *), void *)); | ||
void exit_thread _P((void)); | ||
|
||
typedef void *type_lock; | ||
|
||
type_lock allocate_lock _P((void)); | ||
void free_lock _P((type_lock)); | ||
int acquire_lock _P((type_lock, int)); | ||
#define WAIT_LOCK 1 | ||
#define NOWAIT_LOCK 0 | ||
void release_lock _P((type_lock)); | ||
|
||
void exit_prog _P((int)); | ||
|
||
#undef _P | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.