mirror of
https://github.com/drasko/codezero.git
synced 2026-02-18 21:03:14 +01:00
Initial changes for execve() support
This commit is contained in:
@@ -54,16 +54,22 @@ static inline void write_mr(unsigned int offset, unsigned int val)
|
||||
* map-in the task utcb and read those arguments from there.
|
||||
*/
|
||||
|
||||
static inline void copy_to_utcb(void *arg, int offset, int size)
|
||||
static inline int copy_to_utcb(void *arg, int offset, int size)
|
||||
{
|
||||
BUG_ON(offset + size > PAGE_SIZE);
|
||||
if (offset + size > PAGE_SIZE)
|
||||
return -1;
|
||||
|
||||
memcpy(utcb_page + offset, arg, size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void copy_from_utcb(void *buf, int offset, int size)
|
||||
static inline int copy_from_utcb(void *buf, int offset, int size)
|
||||
{
|
||||
BUG_ON(offset + size > PAGE_SIZE);
|
||||
if (offset + size > PAGE_SIZE)
|
||||
return -1;
|
||||
|
||||
memcpy(buf, utcb_page + offset, size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
@@ -59,5 +59,5 @@
|
||||
#define L4_IPC_TAG_PAGER_UPDATE_STATS 45 /* Pager updates file stats in vfs */
|
||||
#define L4_IPC_TAG_NOTIFY_FORK 46 /* Pager notifies vfs of process fork */
|
||||
#define L4_IPC_TAG_NOTIFY_EXIT 47 /* Pager notifies vfs of process exit */
|
||||
|
||||
#define L4_IPC_TAG_PAGER_OPEN_BYPATH 48 /* Pager opens a vfs file by pathname */
|
||||
#endif /* __IPCDEFS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user