Changeset 6283 for trunk/src


Ignore:
Timestamp:
Jul 10, 2001, 7:23:21 AM (24 years ago)
Author:
bird
Message:

New kernel APIs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/OS2KTK.h

    r4787 r6283  
    1 /* $Id: OS2KTK.h,v 1.4 2000-12-11 06:53:50 bird Exp $
     1/* $Id: OS2KTK.h,v 1.5 2001-07-10 05:23:21 bird Exp $
    22 *
    33 * OS2KTK - OS/2 Kernel Task.
     
    1010#ifndef _OS2KTK_h_
    1111#define _OS2KTK_h_
     12
     13#ifdef __cplusplus
     14extern "C" {
     15#endif
    1216
    1317
     
    6771
    6872
    69 
     73/*******************************************************************************
     74*   External Functions                                                         *
     75*******************************************************************************/
    7076
    7177/**
     
    126132#endif
    127133
    128 #endif
     134
     135/**
     136 * Post signal to one or more processes.
     137 * @returns  NO_ERROR on success.
     138 *           On error ERROR_NOT_DESCENDANT, ERROR_SIGNAL_REFUSED,
     139 *           ERROR_INVALID_PROCID, ERROR_ZOMBIE_PROCESS, ERROR_SIGNAL_PENDING. (it seems)
     140 * @param    usSignal       Signal number.
     141 * @param    usAction       Action.
     142 *                          0 - the process and all children.
     143 *                          1 - only the process
     144 *                          2 - the process and all it's decendants.
     145 *                          3 - all processes in that screen group.
     146 * @param    usSignalArg    Signal argument.
     147 * @param    usPIDSGR       Process Id or Screen Group Id.
     148 */
     149extern ULONG _Optlink POST_SIGNAL32(USHORT usSignal, USHORT usAction, USHORT usSignalArg, USHORT usPIDSGR);
     150
     151#ifdef __cplusplus
     152}
     153#endif
     154
     155
     156#ifdef INCL_OS2KRNL_TCB
     157/**
     158 * Force a thread to be made ready.
     159 * @param   flFlag  Which flag(s?) to set.
     160 * @param   pTCB    Pointer to the thread control block of the thread to be forced.
     161 */
     162extern void KRNLCALL TKForceThread(ULONG flFlag, PTCB pTCB);
     163#endif
     164
     165#ifdef INCL_OS2KRNL_PTDA
     166/**
     167 * Set force flag on a task.
     168 * @param   flFlag  Which flag(s?) to set.
     169 * @param   pPTDA   Pointer to the PTDA of the task to be processed.
     170 * @param   fForce  FALSE   Just set the flag on all threads.
     171 *                  TRUE    Force all threads ready by calling TKForceThread.
     172 */
     173extern void KRNLCALL  TKForceTask(ULONG flFlag, PPTDA pPTDA, BOOL fForce);
     174#endif
     175
     176#ifdef INCL_OS2KRNL_TCB
     177/**
     178 * Get priotity of a thread.
     179 * @returns Thread priority.
     180 * @param   pTCB    pointer to the TCB of the thread in question.
     181 */
     182extern ULONG KRNLCALL TKGetPriority(PTCB pTCB);
     183#endif
     184
     185/**
     186 * Make current thread sleep.
     187 * @returns NO_ERROR on success.
     188 *          ERROR_INTERRUPT if a signal is forced on the thread.
     189 *          ERROR_TIMEOUT if we timeout.
     190 * @param   ulSleepId   32-bit sleep id which TKWakeup will be called with.
     191 * @param   ulTimeout   Number of milliseconds to sleep. (0 is not yield)
     192 *                      -1 means forever or till wakeup.
     193 * @param   fUnint      TRUE:  may not interrupt sleep.
     194 *                      FALSE: may interrupt sleep.
     195 * @param   flSleepType ???
     196 */
     197extern ULONG KRNLCALL TKSleep(ULONG ulSleepId, ULONG ulTimeout, ULONG fUnInterruptable, ULONG flWakeupType);
     198
     199/**
     200 * Wakeup sleeping thread(s).
     201 * @returns NO_ERROR on succes.
     202 *          Appropriate error code on failure.
     203 * @param   ulSleepId       32-bit sleep id which threads are sleeping on.
     204 * @param   flWakeUpType    How/what to wakeup.
     205 * @param   pcWakedUp       Pointer to variable which is to hold the count of
     206 *                          thread waked up.
     207 */
     208extern ULONG KRNLCALL TKWakeup(ULONG ulSleepId, ULONG flWakeupType, PULONG cWakedUp);
     209
     210#ifdef INCL_OS2KRNL_TCB
     211/**
     212 * Wake up a single thread.
     213 * @returns NO_ERROR on succes.
     214 *          Appropriate error code on failure.
     215 * @param   pTCB    Pointer to the TCB of the thread to be waken.
     216 */
     217extern ULONG KRNLCALL TKWakeThread(PTCB pTCB);
     218#endif
     219
     220#ifdef INCL_OS2KRNL_TCB
     221/**
     222 * See which thread will be Wakeup.
     223 * @returns Pointer to TCB of the thread on success.
     224 *          NULL on failure or no threads.
     225 * @param   ulSleepId       32-bit sleep id which threads are sleeping on.
     226 * @param   flWakeUpType    How/what to wakeup.
     227 */
     228extern PTCB  KRNLCALL TKQueryWakeup(ULONG ulSleepId, ULONG flWakeupType);
     229#endif
     230
     231#endif
Note: See TracChangeset for help on using the changeset viewer.