On Mon, Jan 20, 2003 at 11:09:36AM -0800, David Schultz wrote:
> What exactly do you need to change about the swapoff interface?
> Unless you're trying to write a module, anything that's going to
> be invasive into the swap subsystem's data structures probably
> belongs in vm_swap.c.

Yes, that is also what I meant. We now have a swapoff() system call that
does all the work itself.

My idea was to split that up:

/* turn of swap device */
static int swapoff_one(struct swdevt *sp)
{
  /* Do all things that we don't want to know about outside this function
         */
}

/* turn off all swap devices */
int swapoff_all()
{
  int index;
        struct swdevt *sp;

  for (sp = swdevt, index = 0; index < nswdev; index++, sp++)
    swapoff_one(sp);
}

So the swapoff() system call would call swapoff_one() and my code in
kern/kern_swsuspend.c would call swapoff_all().

Mark

-- 
Mark Santcroos                    RIPE Network Coordination Centre
http://www.ripe.net/home/mark/    New Projects Group/TTM

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to