- Add a new sched_affinity() api to be used in the upcoming cpuset

implementation.
 - Add empty implementations of sched_affinity() to 4BSD and ULE.

Sponsored by:	Nokia
This commit is contained in:
jeff 2008-03-02 07:19:35 +00:00
parent 26fa289262
commit 3bd7de5a7c
3 changed files with 12 additions and 1 deletions

View File

@ -1402,5 +1402,10 @@ sched_fork_exit(struct thread *td)
THREAD_LOCK_ASSERT(td, MA_OWNED | MA_NOTRECURSED);
}
void
sched_affinity(struct thread *td)
{
}
#define KERN_SWITCH_INCLUDE 1
#include "kern/kern_switch.c"

View File

@ -2492,6 +2492,11 @@ sched_pctcpu(struct thread *td)
return (pctcpu);
}
void
sched_affinity(struct thread *td)
{
}
/*
* Bind a thread to a target cpu.
*/

View File

@ -32,7 +32,7 @@
*/
/*-
* Copyright (c) 2002, Jeffrey Roberson <jeff@freebsd.org>
* Copyright (c) 2002-2008, Jeffrey Roberson <jeff@freebsd.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -129,6 +129,7 @@ static __inline void sched_pin(void);
void sched_unbind(struct thread *td);
static __inline void sched_unpin(void);
int sched_is_bound(struct thread *td);
void sched_affinity(struct thread *td);
/*
* These procedures tell the process data structure allocation code how