mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.1 KiB
71 lines
1.1 KiB
/*++
|
|
|
|
Copyright (c) 1996 Microsoft Corporation
|
|
All rights reserved
|
|
|
|
Module Name:
|
|
|
|
jobid.h
|
|
|
|
Abstract:
|
|
|
|
Handles job id bitmap.
|
|
|
|
Author:
|
|
|
|
Albert Ting (AlbertT) 24-Oct-96
|
|
|
|
Environment:
|
|
|
|
User Mode -Win32
|
|
|
|
Revision History:
|
|
|
|
Ported from spooler.c code.
|
|
|
|
--*/
|
|
|
|
#ifndef _JOBID_H
|
|
#define _JOBID_H
|
|
|
|
typedef struct _JOB_ID_MAP {
|
|
PDWORD pMap;
|
|
DWORD dwMaxJobId;
|
|
DWORD dwCurrentJobId;
|
|
} JOB_ID_MAP, *PJOB_ID_MAP;
|
|
|
|
|
|
#define pMapFromHandle( hJobIdMap ) (((PJOB_ID_MAP)hJobIdMap)->pMap)
|
|
#define MaxJobId( hJobIdMap ) (((PJOB_ID_MAP)hJobIdMap)->dwMaxJobId)
|
|
|
|
#define vMarkOn( hJobId, Id) \
|
|
((pMapFromHandle( hJobId ))[(Id) / 32] |= (1 << ((Id) % 32) ))
|
|
|
|
#define vMarkOff( hJobId, Id) \
|
|
((pMapFromHandle( hJobId ))[(Id) / 32] &= ~(1 << ((Id) % 32) ))
|
|
|
|
#define bBitOn( hJobId, Id) \
|
|
((pMapFromHandle( hJobId ))[Id / 32] & ( 1 << ((Id) % 32) ) )
|
|
|
|
BOOL
|
|
ReallocJobIdMap(
|
|
HANDLE hJobIdMap,
|
|
DWORD dwNewMinSize
|
|
);
|
|
|
|
DWORD
|
|
GetNextId(
|
|
HANDLE hJobIdMap
|
|
);
|
|
|
|
HANDLE
|
|
hCreateJobIdMap(
|
|
DWORD dwMinSize
|
|
);
|
|
|
|
VOID
|
|
vDeleteJobIdMap(
|
|
HANDLE hJobIdMap
|
|
);
|
|
|
|
#endif // ifdef _JOBID_H
|