(EMPTH_LWP, EMPTH_POSIX, EMPTH_W32): Define in config.h instead of
compiler command line. Don't bother to conditionalize code in .c files that are only compiled when their thread package is used. (_EMPTH_LWP, EMPTH_LWP, _EMPTH_POSIX, EMPTH_POSIX, _EMPTH_WIN32) (EMPTH_W32): Identifiers beginning with an underscore and an uppercase letter are reserved for any use. Rename.
This commit is contained in:
parent
b921d3c262
commit
69150d10fc
14 changed files with 23 additions and 58 deletions
|
@ -31,8 +31,6 @@
|
|||
#include "lwpint.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
#if defined(_EMPTH_LWP)
|
||||
|
||||
struct lwpQueue LwpSchedQ[LWP_MAX_PRIO], LwpDeadQ;
|
||||
|
||||
struct lwpProc *LwpCurrent = NULL;
|
||||
|
@ -310,9 +308,9 @@ lwpInitSystem(int pri, char **ctxptr, int flags)
|
|||
/* *LwpContextPtr = 0; */
|
||||
LwpStackGrowsDown = growsdown(&marker);
|
||||
if (!(LwpCurrent = calloc(1, sizeof(struct lwpProc))))
|
||||
return 0;
|
||||
return NULL;
|
||||
if (!(stack = malloc(64)))
|
||||
return 0;
|
||||
return NULL;
|
||||
if (LWP_MAX_PRIO <= pri)
|
||||
pri = LWP_MAX_PRIO - 1;
|
||||
if (LwpMaxpri < pri)
|
||||
|
@ -407,5 +405,3 @@ lwpStackCheckUsed(struct lwpProc *newp)
|
|||
lwpStatus(newp, "Thread stack %d used, %d left, %d total",
|
||||
used, total - used, total);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue