#include <sys/vm_i386.h>
-#include <minix/portio.h>
-
#include "proto.h"
#include "../../proto.h"
#include "../../proto.h"
} else { \
int fp; \
int mustinvl; \
- u32_t pdeval, *pdevalptr, mask; \
+ u32_t pdeval, mask; \
phys_bytes offset; \
vmassert(psok); \
if(PROC) { \
vmassert(PDE != NOPDE); \
vmassert(mask); \
if(dirtypde & mask) { \
- mustinvl = 1; \
+ mustinvl = TRUE; \
} else { \
- mustinvl = 0; \
+ mustinvl = FALSE; \
} \
inusepde = PDE; \
*PROCPDEPTR(ptproc, PDE) = pdeval; \
*===========================================================================*/
PUBLIC int vm_contiguous(struct proc *targetproc, u32_t vir_buf, size_t bytes)
{
- int first = 1, r, boundaries = 0;
+ int first = 1, r;
u32_t prev_phys, po;
- u32_t prev_vir;
vmassert(targetproc);
vmassert(bytes > 0);
first = 0;
prev_phys = phys;
- prev_vir = vir_buf;
vir_buf += I386_PAGE_SIZE;
bytes -= I386_PAGE_SIZE;
- boundaries++;
}
return 1;
* vm_suspend *
*===========================================================================*/
PRIVATE void vm_suspend(struct proc *caller, struct proc *target,
- vir_bytes linaddr, vir_bytes len, int wrflag, int type)
+ vir_bytes linaddr, vir_bytes len, int type)
{
/* This range is not OK for this process. Set parameters
* of the request and notify VM about the pending request.
rp->p_delivermsg_lin, sizeof(message), addr);
if(addr) {
- vm_suspend(rp, rp, rp->p_delivermsg_lin, sizeof(message), 1,
+ vm_suspend(rp, rp, rp->p_delivermsg_lin, sizeof(message),
VMSTYPE_DELIVERMSG);
r = VMSUSPEND;
} else {
if((r=lin_lin_copy(procs[_SRC_], phys_addr[_SRC_],
procs[_DST_], phys_addr[_DST_], bytes)) != OK) {
struct proc *target;
- int wr;
phys_bytes lin;
if(r != EFAULT_SRC && r != EFAULT_DST)
minix_panic("lin_lin_copy failed", r);
if(r == EFAULT_SRC) {
lin = phys_addr[_SRC_];
target = procs[_SRC_];
- wr = 0;
} else if(r == EFAULT_DST) {
lin = phys_addr[_DST_];
target = procs[_DST_];
- wr = 1;
} else {
minix_panic("r strange", r);
}
#endif
vmassert(proc_ptr->p_endpoint == SYSTEM);
- vm_suspend(caller, target, lin, bytes, wr,
+ vm_suspend(caller, target, lin, bytes,
VMSTYPE_KERNELCALL);
NOREC_RETURN(virtualcopy, VMSUSPEND);
}
#include "kernel.h"
#include "proc.h"
-#include <minix/com.h>
#include <minix/endpoint.h>
#include "clock.h"
*/
unsigned ticks = 1;
- int expired = 0;
struct proc * p, * billp;
#ifdef CONFIG_WATCHDOG
* well. If any of the timers expire, do_clocktick() will send out
* signals.
*/
- if ((p->p_misc_flags & MF_VIRT_TIMER) &&
- (p->p_virt_left -= ticks) <= 0) expired = 1;
- if ((p->p_misc_flags & MF_PROF_TIMER) &&
- (p->p_prof_left -= ticks) <= 0) expired = 1;
+ if ((p->p_misc_flags & MF_VIRT_TIMER)){
+ p->p_virt_left -= ticks;
+ }
+ if ((p->p_misc_flags & MF_PROF_TIMER)){
+ p->p_prof_left -= ticks;
+ }
if (! (priv(p)->s_flags & BILLABLE) &&
- (billp->p_misc_flags & MF_PROF_TIMER) &&
- (billp->p_prof_left -= ticks) <= 0) expired = 1;
+ (billp->p_misc_flags & MF_PROF_TIMER)){
+ billp->p_prof_left -= ticks;
+ }
/*
* Check if a process-virtual timer expired. Check current process, but
#include <minix/endpoint.h>
#include <stddef.h>
#include <signal.h>
-#include <minix/portio.h>
#include <minix/syslib.h>
#include "debug.h"
*===========================================================================*/
PRIVATE int try_one(struct proc *src_ptr, struct proc *dst_ptr, int *postponed)
{
- int i, do_notify, done;
+ int i, done;
unsigned flags;
size_t size;
endpoint_t dst_e;
dst_e= dst_ptr->p_endpoint;
/* Scan the table */
- do_notify= FALSE;
done= TRUE;
for (i= 0; i<size; i++)
{
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
-#include <string.h>
#include <sys/sigcontext.h>
#include <minix/endpoint.h>
#include <minix/safecopies.h>
-#include <minix/portio.h>
/* Declaration of the call vector that defines the mapping of system calls
* to handler functions. The vector is initialized in sys_init() with map(),
* send a notification with source SYSTEM.
*/
register struct proc *rp;
- static int n;
if(!isokprocn(proc_nr) || isemptyn(proc_nr))
minix_panic("send_sig to empty process", proc_nr);