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
+10 -4
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__ */