No locking in kernel code
- No locking in RTS_(UN)SET macros - No lock_notify() - Removed unused lock_send() - No lock/unlock macros anymore
This commit is contained in:
@@ -35,7 +35,7 @@ struct proc *p;
|
||||
p->p_seg.p_cr3 = 0;
|
||||
p->p_misc_flags &= ~MF_FULLVM;
|
||||
}
|
||||
RTS_LOCK_UNSET(p, RTS_VMINHIBIT);
|
||||
RTS_UNSET(p, RTS_VMINHIBIT);
|
||||
return OK;
|
||||
case VMCTL_INCSP:
|
||||
/* Increase process SP. */
|
||||
|
||||
@@ -34,9 +34,7 @@ PUBLIC int do_int86(struct proc * caller, message * m_ptr)
|
||||
* Figuring out the exact source is too complicated. CLOCK_IRQ is normally
|
||||
* not very random.
|
||||
*/
|
||||
lock;
|
||||
get_randomness(&krandom, CLOCK_IRQ);
|
||||
unlock;
|
||||
|
||||
return(OK);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void pagefault( struct proc *pr,
|
||||
/* Don't schedule this process until pagefault is handled. */
|
||||
vmassert(pr->p_seg.p_cr3 == read_cr3());
|
||||
vmassert(!RTS_ISSET(pr, RTS_PAGEFAULT));
|
||||
RTS_LOCK_SET(pr, RTS_PAGEFAULT);
|
||||
RTS_SET(pr, RTS_PAGEFAULT);
|
||||
|
||||
/* Save pagefault details, suspend process,
|
||||
* add process to pagefault chain,
|
||||
|
||||
@@ -569,7 +569,7 @@ PRIVATE void vm_suspend(struct proc *caller, struct proc *target,
|
||||
vmassert(!RTS_ISSET(caller, RTS_VMREQUEST));
|
||||
vmassert(!RTS_ISSET(target, RTS_VMREQUEST));
|
||||
|
||||
RTS_LOCK_SET(caller, RTS_VMREQUEST);
|
||||
RTS_SET(caller, RTS_VMREQUEST);
|
||||
|
||||
#if DEBUG_VMASSERT
|
||||
caller->p_vmrequest.stacktrace[0] = '\0';
|
||||
@@ -837,7 +837,7 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */
|
||||
|
||||
if(caller && RTS_ISSET(caller, RTS_VMREQUEST)) {
|
||||
vmassert(caller->p_vmrequest.vmresult != VMSUSPEND);
|
||||
RTS_LOCK_UNSET(caller, RTS_VMREQUEST);
|
||||
RTS_UNSET(caller, RTS_VMREQUEST);
|
||||
if(caller->p_vmrequest.vmresult != OK) {
|
||||
#if DEBUG_VMASSERT
|
||||
printf("virtual_copy: returning VM error %d\n",
|
||||
|
||||
@@ -277,11 +277,7 @@ PRIVATE void ser_dump_segs(void)
|
||||
|
||||
PRIVATE void ser_debug(int c)
|
||||
{
|
||||
int u = 0;
|
||||
|
||||
serial_debug_active = 1;
|
||||
/* Disable interrupts so that we get a consistent state. */
|
||||
if(!intr_disabled()) { lock; u = 1; };
|
||||
|
||||
switch(c)
|
||||
{
|
||||
@@ -314,7 +310,6 @@ PRIVATE void ser_debug(int c)
|
||||
#endif
|
||||
}
|
||||
serial_debug_active = 0;
|
||||
if(u) { unlock; }
|
||||
}
|
||||
|
||||
PRIVATE void printslot(struct proc *pp, int level)
|
||||
|
||||
Reference in New Issue
Block a user