Brought back schedsofttty() (SMPng casualty). Didn't bring back the
other schedsoft*() functions since they have never been used. Removed confused comment about not needing these functions. The functions delay scheduling of SWIs until the next hardclock tick. For devices that only deliver a few characters per interrupt, this reduces the number of calls to the scheduler by a large factor (about 115 for each sio port at 115200 bps).
This commit is contained in:
parent
5935ef4c44
commit
21144e2fde
@ -50,6 +50,12 @@ void name(void) \
|
||||
sched_ithd((void *) SOFTINTR); \
|
||||
}
|
||||
|
||||
#define DO_SETBITS_AND_NO_MORE(name, var, bits) \
|
||||
void name(void) \
|
||||
{ \
|
||||
atomic_set_int(var, bits); \
|
||||
}
|
||||
|
||||
DO_SETBITS(setdelayed, &spending, loadandclear(&idelayed))
|
||||
DO_SETBITS(setsoftcamnet,&spending, SWI_CAMNET_PENDING)
|
||||
DO_SETBITS(setsoftcambio,&spending, SWI_CAMBIO_PENDING)
|
||||
@ -59,16 +65,7 @@ DO_SETBITS(setsofttty, &spending, SWI_TTY_PENDING)
|
||||
DO_SETBITS(setsoftvm, &spending, SWI_VM_PENDING)
|
||||
DO_SETBITS(setsofttq, &spending, SWI_TQ_PENDING)
|
||||
|
||||
/*
|
||||
* We don't need to schedule soft interrupts any more, it happens
|
||||
* automatically.
|
||||
*/
|
||||
#define schedsoftcamnet
|
||||
#define schedsoftcambio
|
||||
#define schedsoftnet
|
||||
#define schedsofttty
|
||||
#define schedsoftvm
|
||||
#define schedsofttq
|
||||
DO_SETBITS_AND_NO_MORE(schedsofttty, &idelayed, SWI_TTY_PENDING)
|
||||
|
||||
unsigned
|
||||
softclockpending(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user