kernel, arm ucontext: ARM DBG=-g run fixes

kernel:
	. modules can be as big as the space (8MB) between them
	  instead of 4MB; memory is slightly bigger with DBG=-g

arm ucontext:
	. r4 is clobbered by the restore function, as it's
	  used as a scratch register, causing problems for the
	  DBG=-g build
	. r1-r3 are safe for scratch registers, as they are
	  caller-save, so use r3 instead; and don't bother
	  restoring r1-r3, but preserve r4

vfs:
	. improve TLL pointer sanity check a bit

Change-Id: I0e3cfc367fdc14477e40d04b5e044f288ca4cc7d
This commit is contained in:
Ben Gras
2013-06-23 18:37:57 +02:00
parent 456359aa72
commit cdf2f55a90
3 changed files with 8 additions and 9 deletions

View File

@@ -125,11 +125,13 @@ void tll_init(tll_t *tllp)
int tll_islocked(tll_t *tllp)
{
assert(tllp >= (tll_t *) PAGE_SIZE);
return(tllp->t_current != TLL_NONE);
}
int tll_locked_by_me(tll_t *tllp)
{
assert(tllp >= (tll_t *) PAGE_SIZE);
assert(self != NULL);
return(tllp->t_owner == self && !(tllp->t_status & TLL_PEND));
}
@@ -139,7 +141,7 @@ int tll_lock(tll_t *tllp, tll_access_t locktype)
/* Try to lock three-level-lock tll with type locktype */
assert(self != NULL);
assert(tllp != NULL);
assert(tllp >= (tll_t *) PAGE_SIZE);
assert(locktype != TLL_NONE);
self->w_next = NULL;