(LwpContextPtr, lwpInitSystem): Use void ** for pointer to generic
pointer. Users changed.
This commit is contained in:
parent
5c7e97c522
commit
ff2a162587
3 changed files with 4 additions and 5 deletions
|
@ -38,7 +38,7 @@ struct lwpSem;
|
||||||
|
|
||||||
#define LWP_MAX_PRIO 8
|
#define LWP_MAX_PRIO 8
|
||||||
|
|
||||||
struct lwpProc *lwpInitSystem(int prio, char **ctxp, int flags, sigset_t *);
|
struct lwpProc *lwpInitSystem(int prio, void **ctxp, int flags, sigset_t *);
|
||||||
struct lwpProc *lwpCreate(int prio, void (*)(void *), int size,
|
struct lwpProc *lwpCreate(int prio, void (*)(void *), int size,
|
||||||
int flags, char *name, char *desc,
|
int flags, char *name, char *desc,
|
||||||
int argc, char **argv, void *ud);
|
int argc, char **argv, void *ud);
|
||||||
|
|
|
@ -51,7 +51,7 @@ empth_init(void **ctx, int flags)
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
sigaddset(&set, SIGINT);
|
sigaddset(&set, SIGINT);
|
||||||
sigaddset(&set, SIGTERM);
|
sigaddset(&set, SIGTERM);
|
||||||
lwpInitSystem(PP_MAIN, (char **)ctx, flags, &set);
|
lwpInitSystem(PP_MAIN, ctx, flags, &set);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
struct lwpQueue LwpSchedQ[LWP_MAX_PRIO], LwpDeadQ;
|
struct lwpQueue LwpSchedQ[LWP_MAX_PRIO], LwpDeadQ;
|
||||||
|
|
||||||
struct lwpProc *LwpCurrent = NULL;
|
struct lwpProc *LwpCurrent = NULL;
|
||||||
char **LwpContextPtr;
|
void **LwpContextPtr;
|
||||||
int LwpMaxpri = 0; /* maximum priority so far */
|
int LwpMaxpri = 0; /* maximum priority so far */
|
||||||
int LwpStackGrowsDown;
|
int LwpStackGrowsDown;
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ lwpSetPriority(int new)
|
||||||
* initialise the coroutine structures
|
* initialise the coroutine structures
|
||||||
*/
|
*/
|
||||||
struct lwpProc *
|
struct lwpProc *
|
||||||
lwpInitSystem(int pri, char **ctxptr, int flags, sigset_t *waitset)
|
lwpInitSystem(int pri, void **ctxptr, int flags, sigset_t *waitset)
|
||||||
{
|
{
|
||||||
struct lwpQueue *q;
|
struct lwpQueue *q;
|
||||||
int i, *stack, marker;
|
int i, *stack, marker;
|
||||||
|
@ -296,7 +296,6 @@ lwpInitSystem(int pri, char **ctxptr, int flags, sigset_t *waitset)
|
||||||
LwpContextPtr = ctxptr;
|
LwpContextPtr = ctxptr;
|
||||||
if (pri < 1)
|
if (pri < 1)
|
||||||
pri = 1;
|
pri = 1;
|
||||||
/* *LwpContextPtr = 0; */
|
|
||||||
LwpStackGrowsDown = growsdown(&marker);
|
LwpStackGrowsDown = growsdown(&marker);
|
||||||
if (!(LwpCurrent = calloc(1, sizeof(struct lwpProc))))
|
if (!(LwpCurrent = calloc(1, sizeof(struct lwpProc))))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue