Changes between Initial Version and Version 1 of Ticket #36, comment 2


Ignore:
Timestamp:
Jul 28, 2016, 12:37:37 PM (8 years ago)
Author:
erdmann

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #36, comment 2

    initial v1  
    44
    55The Virtual Device driver programming reference should give more information if there also exists a VDH routine to deliberately terminate such thread.
     6
     7Additionally I found this:
     8http://www.yqcomputer.com/515_1075_1.htm
     9
     10
     11<quote>
     12The usage is:
     13 BOOL _Pascal NEAR VDHCreateThread(PTID,PFN);
     14 VOID _Pascal NEAR VDHExitThread(ULONG);
     15
     16 There was a short discussion about VDHCreateThread in OS/2 Device Driver
     17 Programming at yahoo:
     18http://www.yqcomputer.com/
     19
     20 In my LXAPI32.SYS device driver I've implemented "linux kernel threads"
     21 with this function. But you have to be carefull. If a thread is started
     22 by an normal applications request (open, ioctl, etc.) the new created
     23 thread belongs to the application. It hangs on exit until the thread ends.
     24 A workaround is to create a "real kernel thread" as a worker thread at
     25 device driver INIT time. This thread waits for a specific condition (for
     26 example a semaphore). If a kernel thread should be started at
     27 applications request it posts the semaphore. Then the worker thread
     28 starts an other thread.
     29 LXAPI32.SYS works this way.
     30</quote>