Download Virtuoso User Manual

Transcript
Alphabetical List of Virtuoso microkernel services
11.74.
KS_User
• SUMMARY . . . . . Execute function at microkernel level.
• CLASS . . . . . . . . Special
• SYNOPSIS . . . . .
int KS_User(int
(*function)(void *),
void *ArgList)
• DESCRIPTION . . . The KS_User microkernel service is used to execute a user function at the
priority level of the microkernel. All microkernel service requests (from ISR’s,
other nodes, or the timer system) will be queued until the user function
returns. The user function should be short, and must not issue any microkernel service calls. Practically speaking, during the execution a preemption of
tasks is disabled.
• RETURN VALUE . . The return value of the function.
• EXAMPLE . . . . . .
struct arg {
....
} MyArgs;
extern int
MyFunction(MyArgs *);
result = KS_User(MyFunction, &MyArgs);
This service cannot be used to run a the function on a remote node.
Copyright 1996 Eonic Systems
Virtuoso Reference Manual
P2 - 113
PART 3
• SPECIAL NOTE. . . The second parameter to the user function should be a pointer to a structure
containing any parameters the function needs. Needless to say, grave disorder will result if the caller and the routine do not agree on the structure layout.