mirror of
https://github.com/drasko/codezero.git
synced 2026-04-18 01:39:05 +02:00
Added child utcb initialisation to fork call implementation in libposix.
This commit is contained in:
@@ -7,4 +7,6 @@
|
|||||||
#include <l4lib/types.h>
|
#include <l4lib/types.h>
|
||||||
#include <l4lib/arch/utcb.h>
|
#include <l4lib/arch/utcb.h>
|
||||||
|
|
||||||
|
int utcb_init(void);
|
||||||
|
|
||||||
#endif /* __UTCB_H__ */
|
#endif /* __UTCB_H__ */
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ static void *l4_utcb_page(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialises a non-pager task's shared memory utcb page
|
* Initialises a non-pager task's shared memory utcb page
|
||||||
* using posix semantics.
|
* using posix semantics. Used during task initialisation
|
||||||
|
* and by child tasks after a fork.
|
||||||
*/
|
*/
|
||||||
int utcb_init(void)
|
int utcb_init(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,8 +39,11 @@ int fork(void)
|
|||||||
errno = -ret;
|
errno = -ret;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
/* else return value */
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
|
/* If we're a child, we need to initialise the utcb page */
|
||||||
|
if (ret == 0)
|
||||||
|
utcb_init();
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user