Ticket #78: kernthreads.c

File kernthreads.c, 432 bytes (added by Brendan Oakley, 17 years ago)

Example use of VDHCreateThread()

Line 
1 tid = 0;
2 KernThunkStackTo16 ();
3 VDHCreateThread(&tid, EventDoing);
4 KernThunkStackTo32 ();
5 rc = KernBlock(&GPE, 1000, 0, 0, 0); // Waiting start thread
6 if (rc) SayDebug(1,("Start thread is failed? rc=%d\n",rc));
7
8
9// from 32 bit call
10// EventDoing is:
11
12 void EventDoing(void)
13 {
14 KernThunkStackTo32();
15 AcpiOsPrintf("===== Thread for Event is starting tid:%x =====\n",AcpiOsGetThreadId());
16// ......
17 KernThunkStackTo16();
18 }