Abandoned mutexes 281
AbnormalTermination
function 114–115
ABOVE_NORMAL_PRIORITY_CLASS
flag 247
accept
function 417
Access
rights 521
Access control entries (ACEs) 521, 525–527, 535–537, 542
Access control lists (ACLs) 521, 525–527, 535–537, 542, 543
Access control lists, discretionary (DACLs) 520
ACCESS_ALLOWED_ACE
flag 537
ACCESS_DENIED_ACE
flag 537
ACE see Access control entries
ACL see Access control lists
ACL_REVISION
word 526
ACL_SECURITY_INFORMATION
value 536
ACL_SIZE_INFORMATION
flag 536
AcquireSRWLockExclusive
function 311
AcquireSRWLockShared
function 310
AddAccessAllowedAce
function 526
AddAccessDeniedAce
function 526
AddAuditAccessAce
function 543
Address space 132
AddVectoredExceptionHandler
function 128
AF_INET
414
Alertable
I/O 492
wait functions 494–495
AllocateAndInitializeSid
function 524, 543
AllocConsole
function 53
Anonymous pipes 380
APC see Asynchronous Procedure Calls
Application portability 372, 549
Asynchronous I/O 482
with threads 500–501
Asynchronous Procedure Calls (APCs) 366–371
Asynchronous thread cancellation 371
Attributes
directory 72–74
file 70–74
__based
keyword 162
_beginthreadex
Microsoft C function 231–232
BELOW_NORMAL_PRIORITY_CLASS
247
Berkeley Sockets 411, 412, 447
Binary search tree 143–144
bind
function 415
Boss/worker model 236–237
Broadcast mechanisms 401
C library 10–11
in threads 231–232
cache 263–265
Callback function 319–324
CallNamedPipe
function 390
calloc
C library function 143
CancelIoEx
486
CancelWaitableTimer
function 502
cat
file concatenation program 41, 197
program run 43
UNIX command 41
cci
Caesar Cipher program run 45
file encryption program 44
performance 581
cci_f
program 45
cci_fMM
program 157
cciEL
program 173
program run 174
performance 581
program 497
program run 499
cciLBSS
performance 581
cciMM
performance 581
program run 159
cciMT
performance 581
cciMTMM
performance 581
cciOV
performance 581
program 488
program run 491
CDFS see CD_ROM File System
CD-ROM File System (CDFS) 26
ChangeFilePermission
program 539
ChangeServiceConfig2
parameter 469
CHAR
type 34
Character types 34–36
chmod
program 528
UNIX command 528
chmodW, lsFP
program run 531
_clearfp
function 109
Client connections to named pipes 387
Client/server
command line processor 393–400
named pipe connection 389
clientNP
program 393
program run 401
ClientServer.h
393
clientSK
program 424
program run 425
closedir
UNIX function 74
CloseHandle
function 18, 31, 71, 151
CloseServiceHandle
function 469
closesocket
function 418
CloseThresholdBarrier
function 344
Closing files 31–32
COM 167
command
program 435
CompareFileTime
function 73
CompareSid
function 543
Completion routines 492–495
Condition variable (CV) model 337–342
Condition variable predicates 337
condition variables 362
CONIN$
pathname 40
connect
function 419
ConnectNamedPipe
function 388, 483
CONOUT$
pathname 40
Console
control events 204–205
I/O 40–53
ConsolePrompt
function 53
_controlfp
function 108
ControlService
function 470
Copying files 46–48
CopySid
function 543
Co-routines 254
cp
UNIX command 13
cpC
C library program 13
performance 578
cpCF
performance 579
program run 20
Windows program 19
cpUC
performance 579
cpW
performance 579
Windows file copying program 17
cpwFA
performance 579
CREATE_ALWAYS
flag 30
CREATE_NEW
flag 30
CREATE_NEW_CONSOLE
flag 185
CREATE_NEW_PROCESS_GROUP
flag 185, 204
CREATE_SUSPENDED
flag 185, 228
CreateDirectory
function 49
CreateFile
function 28–31, 71, 483
CreateFileMapping
function 150–151
CreateHardLink
function 47, 71
CreateIndexFile
function 165
CreateIoCompletionPort
function 506, 507
CreateMailslot
function 404
CreateMutex
function 279–280
CreateNamedPipe
function 385, 483
CreatePipe
function 380
CreatePrivateObjectSecurity
function 541
CreateProcess
function 184–186, 204, 247
CreateRemoteThread
function 228
CreateSemaphore
function 284
CreateThread
function 226–228
CreateThresholdBarrier
function 344
CreateWaitableTimer
function 501
Creating
directories 49
files 28–31
CRITICAL_SECTION
(CS) 302, 336, 343
guidelines 294–295
locking and unlocking 307
Spin Counts 308–309
CS see CRITICAL_SECTION
Ctrlc
program 126
program run 128
CV see Condition variable
DACL see Discretionary access control list
DACL_SECURITY_INFORMATION
value 536
DaclDefaulted
flag 527
Datagrams 445–447
Deadlocks 281–284
__declspec
C++ storage modifier 169
DeleteAce
function 542
DeleteFile
function 46
DeleteService
function 469
Deleting
directories 49
files 46–48
DETACHED_PROCESS
flag 185, 204
DeviceIoControl
function 65
Directories
attributes 72–74
creating 49
deleting 49
managing and setting 50–51
moving 46–49
naming 27–28
setting 187
DisconnectNamedPipe
function 388
DLL see Dynamic link libraries
dllexport
storage modifier 169
dllimport
storage modifier 169
DllMain
function 175
Drive names 27
DUPLICATE_CLOSE_SOURCE
flag 192
DUPLICATE_SAME_ACCESS
flag 192
DuplicateHandle
function 191
Duplicating handles 191
DWORD
type 29
data structures 131
link libraries (DLLs) 149, 167–175
memory management 131–134
EM_
floating point masks 109
ENABLE_
flags 52
_endthreadex
Microsoft C function 231
EnterCriticalSection
function 270
Environment
block 185, 195–196
Environment strings 195–196
ERROR_HANDLE_EOF
return value 493
ERROR_IO_INCOMPLETE
return value 486
ERROR_PIPE_CONNECTED
return value 388
ERROR_SUCCESS
flag 89
Errors 110–112
/etc
UNIX directory 87
eventPC
program 290
program run 292
Everything.h
38
__except
102
Exception handlers 101–111
Exception
program 121
EXCEPTION_
exception codes 106, 110, 111, 113
EXCEPTION_
return values 104, 129
EXCEPTION_MAXIMUM_PARAMETERS
111
EXCEPTION_RECORD
structure 107
exec
UNIX functions 187
execl
UNIX function 187
Executable image 187
ExitProcess
function 192, 228, 230
ExitThread
function 228
Explicit linking 170–172
Exporting and importing interfaces 169–170
Extended I/O 492–495
FAT see File Allocation Table
fclose
C library function 32
fcntl
UNIX function 85
ferror
C library function 16
Fibers 253–255
FIFO UNIX named pipe 392
File Allocation Table (FAT) file system 26
FILE
C library objects 32
File mapping objects 150–154
File permissions
changing 538
reading 537
FILE_ATTRIBUTE_
flags 30–??, 71, 73
FILE_BEGIN
position flag 61
FILE_CURRENT
position flag 61
FILE_END
position flag 61
FILE_FLAG_
flags 30, ??–31, 63, 386
FILE_FLAG_OVERLAPPED
flag 483, 485, 492
FILE_MAP_ALL_ACCESS
flag 152
FILE_MAP_READ
flag 152
FILE_MAP_WRITE
flag 152
FILE_SHARE_WRITE
flag 29
Files
attributes 70–74
closing 31–32
copying 46–48
creating 28–31
deleting 46–48
handles 31
locking 81–86
memory-mapped 131
moving 46–49
opening 28–31
paging 135
pointers 60–62
reading 32–33
resizing 64
searching for 70–71
systems 25–26
writing 33
FileTimeToLocalFileTime
function 73
FileTimeToSystemTime
function 72
FillTree
program 147
Filter
exception filtering program run 124
function program 123
Filter expressions 103–104
__finally
113
FIND_DATA
structure 70
FindFirstFile
function 64, 70–71
FindNextFile
function 71
Floating-point exceptions 108–110
FlushViewOfFile
function 153
fopen
C library function 32
fork
UNIX function 186
FormatMessage
function 38
fread
C library function 34
free
C library function 143
FreeConsole
function 53
FreeLibrary
function 172
freopen
C library function 32
FSCTL_SET_SPARSE
flag 65
fwrite
C library function 34
GenerateConsoleCtrlEvent
function 124, 205
Generic characters 34–36
GENERIC_READ
29
for named pipes 540
GENERIC_WRITE
29
for named pipes 540
GetAce
function 537
GetAclInformation
function 536
GetCommandLine
function 202
GetCompressedFileSize
function 64
GetCurrentDirectory
function 50
GetCurrentProcess
function 190
GetCurrentProcessId
function 190
GetCurrentThread
function 229
GetCurrentThreadId
function 229
GetDiskFreeSpace
function 63
GetEnvironmentVariable
function 196
GetExceptionCode
function 105–106
GetExceptionInformation
function 106
GetExitCodeProcess
function 192–193
GetExitCodeThread
function 229
GetFileAttributes
function 73
GetFileInformationByHandle
function 71
GetFileSecurity
function 535
GetFileSize
function 64
GetFileSizeEx
function 64
GetFileTime
function 72
GetFileType
function 73
GetFullPathName
function 72
GetKernelObjectSecurity
function 541
GetMailslotInfo
function 404
GetModuleFileName
function 172, 191
GetModuleFileNameEx
function 191
GetModuleHandle
function 172
GetNamedPipeHandleState
function 387
GetNamedPipeInfo
function 388
GetOverlappedResult
function 486
GetPriorityClass
function 247
GetPrivateObjectSecurity
function 541
GetProcAddress
function 172
GetProcessAffinityMask
function 318, 330
GetProcessHeap
function 134, 142
GetProcessIdOfThread
function 229
GetProcessorAffinityMask
function 250
GetProcessTimes
function 202
GetQueuedCompletionStatus
function 507
GetSecurityDescriptorControl
function 523
GetSecurityDescriptorDacl
function 536
GetSecurityDescriptorGroup
function 525, 536
GetSecurityDescriptorOwner
function 525, 536
GetSecurityDescriptorSacl
function 543
GetShortPathName
function 72
GetStartupInfo
function 185
GetStdHandle
function 40
GetSystemDirectory
function 187
GetSystemInfo
function 134
GetTempFileName
function 74
GetTempPath
function 74
GetThreadIOPendingFlag
function 229
GetThreadPriority
function 248
GetThreadTimes
function 202
GetTokenInformation
function 543
GetUserName
function 524
GetWindowsDirectory
function 187
Global storage 266
Granularity, locking 295
grep
UNIX command 197
grepMP
performance 583
program run 200
search program 198
grepMT
performance 583
program run 235
search program 233
grepSQ
performance 583
GROUP_SECURITY_INFORMATION
value 536
Growable and nongrowable heaps 137
Guarded code blocks 102–104
HAL see Hardware Abstraction Layer
HANDLE
variable type 18
Handlers
exception 101–111
termination 113–117
duplicating 191
inheritable 188–189
pseudo 190
hard link 47
Hardware Abstraction Layer (HAL) 5
HEAP_GENERATE_EXCEPTIONS
flag 106, 136, 138, 140, 141
HEAP_NO_SERIALIZE
flag 136, 138, 140, 141
HEAP_REALLOC_IN_PLACE_ONLY
flag 140
HEAP_ZERO_MEMORY
flag 138, 140
HeapCompact
function 142
HeapDestroy
function 137
HeapLock
function 141, 142, 284
HeapReAlloc
function 139
Heaps 134–143
growable and nongrowable 137
synchronizing 284
HeapSize
function 140
HeapValidate
function 142
HeapWalk
function 142
HIGH_PRIORITY_CLASS
247
HighPart
data item 62
HINSTANCE
handle 171
HKEY_
registry keys 88
htonl
function 418
htons
function 418
huge files 60
I/O
alertable 492
asynchronous 482
console 40–53
extended 492–495
IDLE_PRIORITY_CLASS
247
Implicit linking 168–170
INADDR_ANY
flag 416
Inheritance, handles 191
InitializeAcl
function 521, 526
InitializeConditionVariable
function 362
InitializeCriticalSection
function 265, 269, 309
InitializeCriticalSectionAndSpinCount
function 271
InitializeSecurityDescriptor
function 523
InitializeSid
function 524
InitializeSRWLock
function 310, 318, 319
InitializeUnixSA
function 531
InitUnFp
function 532
In-process servers 434
Interfaces, exporting and importing 169–170
Interlocked functions 265, 296–297
InterlockedCompareExchange
function 297
InterlockedDecrement
function 265
InterlockedExchange
function 296
InterlockedExchangeAdd
function 296
InterlockedIncrement
function 265
Internet protocol 414
Interprocess communication (IPC)
one-way 188
two-way 384–392
INVALID_HANDLE_VALUE
134, 387, 506
INVALID_SOCKET
414
IP address 416
IPC see Interprocess communication
IsValidAcl
function 535
IsValidSecurityDescriptor
function 535
IsValidSid
function 535
Job
management 205
objects 214–215
JobMgt
displaying active jobs program 211
new job information function 209
process ID program 212
JobObjectShell
program run 216
JobShell
background job program 206
program run 213
Key handle 89
KEY_ALL_ACCESS
flag 89
KEY_ENUMERATE_SUBKEYS
flag 89
KEY_QUERY_VALUE
flag 89
KEY_WRITE
flag 89
LARGE_INTEGER
202
Microsoft C data type 62
__leave
statement 114
LeaveCriticalSection
function 270
Linking
explicit 170–172
implicit 168–170
run-time 170–172
Linux xxvii
listen
function 416
LoadLibrary
function 171
LoadLibraryEx
function 171
Local storage 266
LocalFileTimeToFileTime
function 73
LOCKFILE_EXCLUSIVE_LOCK
flag 82
LOCKFILE_FAIL_IMMEDIATELY
flag 82
LockFileEx
function 81–82
LocSrver
locate the server function 407
LONGLONG
data type 62
LookupAccountName
function 523–524
LowPart
data item 62
lp
prefix 29
lpsa
prefix 30
lpsz
prefix 29
LPTSTR
type 35
lsFP
program 530
lsReg
listing Registry program 92
program run 96
lsW
file listing program 75
program run 78
MAILSLOT_WAIT_FOREVER
flag 404
Mailslots 401–405
main
service entry program 455
MakeAbsoluteSD
function 543
MakeSelfRelativeSD
function 543
MAKEWORD
macro 413
malloc
C library function 143
Managing directories 50–51
Mapping, file 152–155
MapViewOfFile
function 84, 152
MapViewOfFileEx
function 152
Master-slave scheduling 255
MAXIMUM_WAIT_OBJECTS
195
MCW_EM
mask 109
Memory architecture 263
Memory block in heap 140
Memory management 131–134
performance 297
Memory map size 152
Memory-mapped files 131, 149–155
MESSAGE
type 422
Message waiting 294
Microsoft Visual C++ 547
mkfifo
UNIX function 392
mmap
UNIX function 154
mode
UNIX argument 32
Mode
word 51
Models
boss/worker 236–237
condition variable (CV) 337–342
pipeline 236
threading 236–243
work crew 236
MoveFile
function 48–49
MOVEFILE_
flags 49
MoveFileEx
function 48–49
Moving
directories 46–49
files 46–49
MSG_PEEK
flag 421
MsgWaitForMultipleObjects
function 294
MsgWaitForMultipleObjectsEx
492
Multiple threads 340
Multiprocessor 5, 181, 201, 215
Multistage pipeline program 354
munmap
UNIX function 154
granularity 295
guidelines 294
Mutual exclusion object 279–284
Named
pipes 384–392
sockets 416
Naming
conventions 9
directories 27–28
drives 27
files 27–28
NMPWAIT_
named pipe flags 391
Nongrowable heap size 136
NORMAL_PRIORITY_CLASS
flag 247
NT File System (NTFS) 26
NT services 453
Objects 195
waiting for 294
Open systems 6–7
open
UNIX function 32
OPEN_ALWAYS
flag 30
OPEN_EXISTING
flag 30
opendir
UNIX function 74
OpenFileMapping
function 151
Opening files 28–31
OpenMutex
function 280
OpenProcess
function 190
OpenSCManager
function 467
OpenSemaphore
function 284
OpenService
function 469
OpenThread
function 229
OpenWaitableTimer
function 502
Operating systems
functionality 1–5
standards 6–7
Options
function 41
OVERLAPPED
structure 82, 484–485
OWNER_SECURITY_INFORMATION
536
PAGE_READONLY
flag 150
PAGE_READWRITE
flag 150
PAGE_WRITECOPY
flag 150
Paging files 135
Parallelism, program 244
PATH
environment variable 187
Pathnames 27–28
PeekNamedPipe
function 392
Peer-to-peer scheduling 255
Periodic signal program 503
Permissions 527–528
perror
C library function 16
PF_INET
flag 414
PIPE_
flags 386
Pipeline model 236
Pipes
anonymous 380
named 384–392
summary 405
Pointers
file 60–62
PostQueuedCompletionStatus
function 508
Predefined data types 8
PrintMsg
program 54
PrintStrings
function 53
Priority and scheduling 246–249
Process
components 181–182
console 185
creation 183–186
environment 195
handle inheritance 188–189
identities 190–191
priority 185
priority and scheduling 246–249
single 195
synchronization 194–195, 268–293
waiting for completion 194–195
PROCESS_INFORMATION
structure 186, 190
ProcessItem
function 529
Processor affinity 318, 329–331
Producer and consumer program 274
Producer/consumer model 331, 340
Program event logging 461
Program parallelism 244
pthread_
Pthreads functions 231, 281, 288, 311, 339
Pthreads 362
application portability 372
open source implementation 376
PulseEvent
function 288, 338, 340
pwd
program 55
program run 56
UNIX command 55
qsort
C library function 159
QuadPart
data item 62
QueryJobInformationObject
function 215
QueryServiceStatus
function 471
QueueObj
queue management functions 349, 363
Queues
definitions 348
in a multistage pipeline 352–354
object 348–349
QueueUserAPC
function 367
Race conditions 267
RaiseException
function 110–113
read
UNIX function 33
readdir
UNIX function 74
ReadFile
function 32–33, 380, 386, 483
ReadFileEx
function 493
ReadFilePermissions
program 537
Reading files 32–33
realloc
C library function 143
REALTIME_PRIORITY_CLASS
247
ReceiveMessage
function 423
RecordAccess
program 66
program run 69
recv
function 420
recvfrom
function 446
Redirect
program run 383
ReferencedDomain
524
REG_
flags 91
REG_BINARY
registry data type 92
REG_DWORD
registry data type 92
REG_EXPAND_SZ
registry data type 92
REG_SZ
registry data type 92
RegCloseKey
function 89
RegCreateKeyEx
function 90
RegDeleteKey
function 91
RegDeleteValue
function 92
REGEDIT32
command 86
RegEnumKeyEx
function 90
RegEnumValue
function 91
RegEnumValueEx
function 92
Registry 86–88
key management 89–91
RegOpenKeyEx
function 89
RegQueryValueEx
function 92
RegSetValueEx
function 92
ReleaseMutex
function 280
ReleaseSemaphore
function 285, 342
ReleaseSRWLockExclusive
function 311
ReleaseSRWLockShared
function 310
RemoveDirectory
function 49
RemoveVectoredExceptionHandler
function 128
ReOpenFile
function 31
ReportError
program 39
ReportException
function 112
ResetEvent
function 288
ResumeThread
function 185, 230
Run-time linking 170–172
SACL see System ACLs
SANs see Storage area networks
sbrk
UNIX function 137
Scheduling 255
SCM see Service Control Manager
Searching for a file 70–71
SEC_IMAGE
flag 150
Secure Socket Layer 434
Secure Sockets Layer 451
attributes 531
attributes initialization program 532
identifiers (SIDs) 523–525
kernel object 541
user object 541
Windows objects 519
Security descriptors 520–527, 542–543
reading and changing 535–537
SECURITY_ATTRIBUTES
structure 188, 519–520
SECURITY_DESCRIPTOR
structure 522
SEH see Structured Exception Handling
Semaphore Throttle 313–315
send
function 420
SendReceiveSKHA
program 443
SendReceiveSKST
program 438
sendto
function 446
Sequential file processing 13
serverCP
program 510
serverNP
program 395
program run 400
Servers, in-process 434
serverSK
program 427
program run 433
Service Control Manager (SCM) 454
SERVICE_AUTO_START
flag 469
SERVICE_BOOT_START
flag 469
SERVICE_DEMAND_START
flag 469
SERVICE_STATUS
structure 457–459
SERVICE_STATUS_HANDLE
object 456
SERVICE_SYSTEM_START
flag 469
SERVICE_TABLE_ENTRY
array 455
ServiceMain
functions 455–460
Services
control handler 460–461
control handler registration 456
control manager 454
control program 472
controlling 470
controls 460
creating 468–469
debugging 477
deleting 468–469
opening 467
setting status 456
starting 469
state 459
status query 471
type 458
wrapper program 462
ServiceShell
program 472
program run 476
ServiceStartTable
function 455
ServiceStatus
function 457
ServiceType
word ??–458
SetConsoleCtrHandler
function 124
SetConsoleMode
function 51–52
SetCriticalSectionSpinCount
function 271, 309
SetCurrentDirectory
function 50
SetEndOfFile
function 64
SetEnvironmentVariable
function 196
SetFileAttributes
function 73
SetFilePointer
function 60, 61, 62, 485
SetFileSecurity
function 535
SetFileShortName
function 72
SetFileTime
function 73
SetInformationJobObject
function 214
SetKernelObjectSecurity
function 541
SetMailslotInfo
function 404
SetNamedPipeHandleState
function 387
SetPriorityClass
function 247
SetPrivateObjectSecurity
function 541
SetProcessAffinityMask
function 250, 330
SetSecurityDescriptorControl
function 523
SetSecurityDescriptorDacl
function 527
SetSecurityDescriptorGroup
function 525
SetSecurityDescriptorOwner
function 521
SetSecurityDescriptorSacl
function 543
SetServiceStatus
function 457
SetStdHandle
function 40
SetThreadAffinityMask
function 330
SetThreadIdealProcessor
function 250
SetThreadPriority
function 248
SetThreadPriorityBoost function
249
Setting directories 50–51
SetWaitableTimer
function 502
Shared
memory in UNIX 154
variables 271–273
shutdown
function 417
SID management 543
SID_NAME_USE
flag 524
SIDs see Security identifiers
Signaled state 230
Signaling producer and consumer program 290
SignalObjectAndWait
(SOAW) function 337, 339, 342–344, 492
in UNIX 113
simplePC
program 274
simplePC
program run 277
SimpleService
operation 476
SimpleService
program 462
SimpleService
program run 466
SimpleServiceLog.txt
listing 467
64-bit file addresses 59–60
SkipArg
function 202
Sleep
function 253
SleepConditionVariableCS
function 362
SleepConditionVariableSRW
function 363
SleepEx
function 494
Slim Reader/Writer (SRW) Locks 309–311
CRITICAL_SECTION
comparison 310
SMP see Symmetric multiprocessing
SOAW see SignalObjectAndWait
SOCK_DGRAM
flag 445
sockaddr
structure 415
sockaddr_in
structure 416
socket
function 414
Socket-based
client program 424
server program 427
Sockets
binding 415–416
closing 417
connecting to client 417
connecting to server 419–420
creating 414
disconnecting 417
initialization 413
message receive 422–423
sort
UNIX command 143
sortBT
binary search tree program 145
program run 148
sortFL
program 159
program run 161
sortMM
based pointers program 163
creating the index program 165
program run 166
sortMT
merge-sort program 239
Sparse file 64
SrvrBcst
mailslot client program 406
SRW see Slim Reader/Writer
SSIZE_T
data type 136
SSL see Secure Sockets Layer
Stack unwind 116
Standard
input 188
StartAddr
function pointer 227
STARTF_USESTDHANDLES
flag 185
StartService
function 470
StartServiceCtrlDispatcher
function 454
stat
UNIX function 74
STATE_TYPE
data structure 337
statsMX
program run 315
thread statistics program 303
statsSRW
program run 322
Status functions for named pipes 387
STATUS_ACCESS_VIOLATION
exception code 141
STATUS_NO_MEMORY
exception code 106, 141
STD_ERROR_HANDLE
flag 40
STD_INPUT_HANDLE
flag 40
STD_OUTPUT_HANDLE
flag 40
STILL_ACTIVE
process status 193, 229
Storage area networks (SANs) 26
Storage, local and global 266
Strings, environment 195–196
Structured Exception Handling (SEH) 101–102, 117
Structures, overlapped 484–485
SuspendThread
function 230
Symmetric multiprocessing (SMP) 181, 264
SynchObj
queue definitions 348
threshold barrier definitions program 345
Synchronization 246–249
heap 284
objects 492
performance impact 302–303
processes 194–195
processes and threads 268–293
SYNCHRONIZE
flag 190
synchronous cancellation 371
error codes 19
include files 9
SystemTimeToFileTime
function 73
tchar.h
35
TCHAR
type 34
Temporary file names 74
TerminateProcess
function 193, 205
TerminateThread
function 228, 230
Termination handlers 113–117
testTHB
program run 347
testTHB
test program 345
THB_HANDLE
threshold barrier handle 344
ThbObject
threshold barrier implementation program 345
Thread Local Storage (TLS) 182, 225, 245–246
Thread pool 312–323
Thread stack 372
THREAD_MODE_BACKGROUND_BEGIN
flag 248
THREAD_MODE_BACKGROUND_END
flag 248
THREAD_PRIORITY_
flags 248
ThreadParm
thread argument 228
Threadpool timers 505
Threads
common mistakes 251–252
creating 226–228
file locking 81–86
identity 229
local storage (TLS) 225
models 236–243
overview 223–224
primary 184
priority and scheduling 246–249
resuming 229–230
single 181–182
states 249–251
statistics program 303
suspending 229–230
synchronization 246–249, 268–293
terminating 228
waiting for termination 230
with asynchronous I/O 500–501
with the C library 231–232
Thread-safe
code 259–268
DLL program 438
DLL program with state structure 443
libraries 232
ThreeStage.c
multistage pipeline program 354
ThreeStage[_Sig]
program run 360
ThreeStageCS[_Sig]
program run 361
ThreeStageCV
program run 366
Threshold barrier object 344–348
time
UNIX command 202
TimeBeep
program 503
Timed waits 252
timep
performance 575
process times program 203
Timers
waitable 501–503
TLS see Thread Local Storage
TLS_MINIMUM_AVAILABLE
flag 245
TlsAlloc
function 246
TlsFree
function 246
TlsGetValue
function 246
TlsSetValue
function 246
_tmain
function 36
touch
program 79
program run 79
toupper
program 118
program run 120
TransactNamedPipe
function 390, 483
TRUNCATE_EXISTING
flag 30
__try
102
TryEnterCriticalSection
function 270
Try-except blocks 102–104, 113–116
Try-finally blocks 113–116
UCT see Universal Coordinated Time
UDF see Universal Disk Format
ULONGLONG
data type 62
Unicode 34–36
Unicode UTF-16 34
Universal Coordinated Time (UCT) 72
Universal Disk Format (UDF) 26
unlink
UNIX function 49
UnlockFileEx
function 83
UnmapViewOfFile
function 153
Unwinding stacks 116
utime
UNIX function 74
va_arg
C library function 53
va_end
C library function 53
va_start
C library function 53
Value management 91–92
Variables, environment 195–196
VectoredHandler
128
version
exercise run 180
Virtual
address space 132
memory manager 133
memory space allocation 152
volatile
storage modifier 262, 265, 374
Wait
for messages and objects 294
functions 494–495
WAIT_ABANDONED_0
return value 195, 281
WAIT_FAILED
return value 195
WAIT_OBJECT_0
return value 195
WAIT_TIMEOUT
return value 195
Waitable timers 501–503
WaitForMultipleObjects
function 194–195, 230, 279, 288
WaitForMultipleObjectsEx
function 494
WaitForSingleObject
function 194–195, 230, 279
WaitForSingleObjectEx
function 494
Waiting for a process 194–195
WaitNamedPipe
function 388
WakeAllConditionVariable
function 363
WakeConditionVariable
function 363
wchar.h
36
WCHAR
type 34
Win16 compatibility 9
Windows
API 2
condition variables 362–365
principles 7–9
versions 3
Windows 2003 Server 31
Winsock 411
API 412
Initialization 413
Work crew model 236
write
UNIX function 33
WRITE_DAC
permission 536
WriteConsole
function 52
WriteFileEx
function 493
Writing files 33
WS2_32.DLL
413
WSACleanup
function 413
WSADATA
structure 413
WSAGetLastError
function 413
WSAStartup
function 413