Initial changes for execve() support

This commit is contained in:
Bahadir Balban
2008-11-13 21:45:30 +02:00
parent 44c34026b2
commit d182b5b35a
21 changed files with 618 additions and 9 deletions

View File

@@ -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__ */

View File

@@ -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__ */