mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Fixed a c library issue with wrong valued SEEK_SET SEEK_CUR ...
This commit is contained in:
@@ -136,14 +136,14 @@ typedef long fpos_t; /* same */
|
||||
#define FILENAME_MAX 37
|
||||
#define L_tmpnam 37
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0
|
||||
#endif
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 0
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 1
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 2
|
||||
#define SEEK_END 2
|
||||
#endif
|
||||
|
||||
#define TMP_MAX 37
|
||||
|
||||
@@ -183,7 +183,7 @@ int tcb_check_and_lazy_map_utcb(struct ktcb *task)
|
||||
* There you go:
|
||||
*
|
||||
* if task == current && not mapped, page-in, if not return -EFAULT
|
||||
* if task != current && not mapped, page-in to task, return -EFAULT
|
||||
* if task != current && not mapped, return -EFAULT since can't page-in on behalf of it.
|
||||
* if task != current && task mapped, but mapped != current mapped, map it, return 0
|
||||
* if task != current && task mapped, but mapped == current mapped, return 0
|
||||
*/
|
||||
@@ -211,18 +211,18 @@ int tcb_check_and_lazy_map_utcb(struct ktcb *task)
|
||||
virt_to_phys_by_pgd(task->utcb_address,
|
||||
TASK_PGD(task))) !=
|
||||
virt_to_phys_by_pgd(task->utcb_address,
|
||||
TASK_PGD(current)))
|
||||
TASK_PGD(current))) {
|
||||
/*
|
||||
* We have none or an old reference.
|
||||
* Update it with privileged flags,
|
||||
* so that only kernel can access.
|
||||
*/
|
||||
printk("%s: Caught old utcb mapping.\n", __FUNCTION__);
|
||||
add_mapping_pgd(phys, task->utcb_address,
|
||||
page_align_up(UTCB_SIZE),
|
||||
MAP_SVC_RW_FLAGS,
|
||||
TASK_PGD(current));
|
||||
BUG_ON(!phys);
|
||||
}
|
||||
BUG_ON(!phys);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user