Added a binary tree implementation
[reactos.git] / reactos / include / ddk / exfuncs.h
1 #ifndef _NTOS_EXFUNCS_H
2 #define _NTOS_EXFUNCS_H
3
4 /* EXECUTIVE ROUTINES ******************************************************/
5
6 #define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
7
8 VOID
9 FASTCALL
10 ExAcquireFastMutex (
11 PFAST_MUTEX FastMutex
12 );
13 VOID
14 FASTCALL
15 ExAcquireFastMutexUnsafe (
16 PFAST_MUTEX FastMutex
17 );
18 BOOLEAN
19 STDCALL
20 ExAcquireResourceExclusive (
21 PERESOURCE Resource,
22 BOOLEAN Wait
23 );
24 BOOLEAN
25 STDCALL
26 ExAcquireResourceExclusiveLite (
27 PERESOURCE Resource,
28 BOOLEAN Wait
29 );
30 BOOLEAN
31 STDCALL
32 ExAcquireResourceSharedLite (
33 PERESOURCE Resource,
34 BOOLEAN Wait
35 );
36 BOOLEAN
37 STDCALL
38 ExAcquireSharedStarveExclusive (
39 PERESOURCE Resource,
40 BOOLEAN Wait
41 );
42 BOOLEAN
43 STDCALL
44 ExAcquireSharedWaitForExclusive (
45 PERESOURCE Resource,
46 BOOLEAN Wait
47 );
48
49 PVOID
50 STDCALL
51 ExAllocateFromZone (
52 PZONE_HEADER Zone
53 );
54
55 /*
56 * PVOID
57 * ExAllocateFromZone (
58 * PZONE_HEADER Zone
59 * );
60 *
61 * FUNCTION:
62 * Allocate a block from a zone
63 *
64 * ARGUMENTS:
65 * Zone = Zone to allocate from
66 *
67 * RETURNS:
68 * The base address of the block allocated
69 */
70 #define ExAllocateFromZone(Zone) \
71 (PVOID)((Zone)->FreeList.Next); \
72 if ((Zone)->FreeList.Next) \
73 (Zone)->FreeList.Next = (Zone)->FreeList.Next->Next
74
75 /*
76 * FUNCTION: Allocates memory from the nonpaged pool
77 * ARGUMENTS:
78 * NumberOfBytes = minimum size of the block to be allocated
79 * PoolType = the type of memory to use for the block (ignored)
80 * RETURNS:
81 * the address of the block if it succeeds
82 */
83 PVOID
84 STDCALL
85 ExAllocatePool (
86 IN POOL_TYPE PoolType,
87 IN ULONG NumberOfBytes
88 );
89
90 PVOID
91 STDCALL
92 ExAllocatePoolWithQuota (
93 IN POOL_TYPE PoolType,
94 IN ULONG NumberOfBytes
95 );
96 PVOID
97 STDCALL
98 ExAllocatePoolWithQuotaTag (
99 IN POOL_TYPE PoolType,
100 IN ULONG NumberOfBytes,
101 IN ULONG Tag
102 );
103 PVOID
104 STDCALL
105 ExAllocatePoolWithTag (
106 IN POOL_TYPE PoolType,
107 IN ULONG NumberOfBytes,
108 IN ULONG Tag
109 );
110
111 VOID
112 STDCALL
113 ExConvertExclusiveToSharedLite (
114 PERESOURCE Resource
115 );
116
117 NTSTATUS
118 STDCALL
119 ExCreateCallback (
120 OUT PCALLBACK_OBJECT * CallbackObject,
121 IN POBJECT_ATTRIBUTES ObjectAttributes,
122 IN BOOLEAN Create,
123 IN BOOLEAN AllowMultipleCallbacks
124 );
125
126 NTSTATUS
127 STDCALL
128 ExDeleteResource (
129 PERESOURCE Resource
130 );
131 NTSTATUS
132 STDCALL
133 ExDeleteResourceLite (
134 PERESOURCE Resource
135 );
136
137 VOID
138 STDCALL
139 ExDisableResourceBoostLite (
140 PERESOURCE Resource
141 );
142
143 NTSTATUS
144 STDCALL
145 ExExtendZone (
146 PZONE_HEADER Zone,
147 PVOID Segment,
148 ULONG SegmentSize
149 );
150
151 /*
152 * FUNCTION: Releases previously allocated memory
153 * ARGUMENTS:
154 * block = block to free
155 */
156 VOID
157 STDCALL
158 ExFreePool (
159 PVOID block
160 );
161
162 /*
163 * PVOID
164 * ExFreeToZone (
165 * PZONE_HEADER Zone,
166 * PVOID Block
167 * );
168 *
169 * FUNCTION:
170 * Frees a block from a zone
171 *
172 * ARGUMENTS:
173 * Zone = Zone the block was allocated from
174 * Block = Block to free
175 */
176 #define ExFreeToZone(Zone,Block) \
177 (((PSINGLE_LIST_ENTRY)(Block))->Next = (Zone)->FreeList.Next, \
178 (Zone)->FreeList.Next = ((PSINGLE_LIST_ENTRY)(Block)), \
179 ((PSINGLE_LIST_ENTRY)(Block))->Next)
180
181 /*
182 * ERESOURCE_THREAD
183 * ExGetCurrentResourceThread (
184 * VOID
185 * );
186 */
187 #define ExGetCurrentResourceThread() \
188 ((ERESOURCE_THREAD)PsGetCurrentThread())
189
190 ULONG
191 STDCALL
192 ExGetExclusiveWaiterCount (
193 PERESOURCE Resource
194 );
195
196 ULONG
197 STDCALL
198 ExGetPreviousMode (
199 VOID
200 );
201
202 ULONG
203 STDCALL
204 ExGetSharedWaiterCount (
205 PERESOURCE Resource
206 );
207
208 /*
209 * VOID
210 * ExInitializeFastMutex (
211 * PFAST_MUTEX FastMutex
212 * );
213 */
214 #define ExInitializeFastMutex(_FastMutex) \
215 ((PFAST_MUTEX)_FastMutex)->Count = 1; \
216 ((PFAST_MUTEX)_FastMutex)->Owner = NULL; \
217 ((PFAST_MUTEX)_FastMutex)->Contention = 0; \
218 KeInitializeEvent(&((PFAST_MUTEX)_FastMutex)->Event, \
219 SynchronizationEvent, \
220 FALSE);
221
222 NTSTATUS
223 STDCALL
224 ExInitializeResource (
225 PERESOURCE Resource
226 );
227 NTSTATUS
228 STDCALL
229 ExInitializeResourceLite (
230 PERESOURCE Resource
231 );
232
233 /*
234 * VOID
235 * ExInitializeSListHead (
236 * PSLIST_HEADER SListHead
237 * );
238 */
239 #define ExInitializeSListHead(ListHead) \
240 (ListHead)->Alignment = 0
241
242 /*
243 * VOID
244 * ExInitializeWorkItem (
245 * PWORK_QUEUE_ITEM Item,
246 * PWORKER_THREAD_ROUTINE Routine,
247 * PVOID Context
248 * );
249 *
250 * FUNCTION:
251 * Initializes a work item to be processed by one of the system
252 * worker threads
253 *
254 * ARGUMENTS:
255 * Item = Pointer to the item to be initialized
256 * Routine = Routine to be called by the worker thread
257 * Context = Parameter to be passed to the callback
258 */
259 #define ExInitializeWorkItem(Item, WorkerRoutine, RoutineContext) \
260 ASSERT_IRQL(DISPATCH_LEVEL); \
261 (Item)->Routine = (WorkerRoutine); \
262 (Item)->Context = (RoutineContext); \
263 (Item)->Entry.Flink = NULL; \
264 (Item)->Entry.Blink = NULL;
265
266 NTSTATUS
267 STDCALL
268 ExInitializeZone (
269 PZONE_HEADER Zone,
270 ULONG BlockSize,
271 PVOID InitialSegment,
272 ULONG InitialSegmentSize
273 );
274
275 LARGE_INTEGER
276 STDCALL
277 ExInterlockedAddLargeInteger (
278 PLARGE_INTEGER Addend,
279 LARGE_INTEGER Increment,
280 PKSPIN_LOCK Lock
281 );
282
283 VOID
284 FASTCALL
285 ExInterlockedAddLargeStatistic (
286 IN PLARGE_INTEGER Addend,
287 IN ULONG Increment
288 );
289
290 ULONG
291 STDCALL
292 ExInterlockedAddUlong (
293 PULONG Addend,
294 ULONG Increment,
295 PKSPIN_LOCK Lock
296 );
297
298 /*
299 * PVOID
300 * STDCALL
301 * ExInterlockedAllocateFromZone (
302 * PZONE_HEADER Zone,
303 * PKSPIN_LOCK Lock
304 * );
305 */
306 #define ExInterlockedAllocateFromZone(Zone,Lock) \
307 (PVOID)ExInterlockedPopEntryList(&(Zone)->FreeList,Lock)
308
309 LONGLONG
310 FASTCALL
311 ExInterlockedCompareExchange64 (
312 IN OUT PLONGLONG Destination,
313 IN PLONGLONG Exchange,
314 IN PLONGLONG Comparand,
315 IN PKSPIN_LOCK Lock
316 );
317
318 INTERLOCKED_RESULT
319 STDCALL
320 ExInterlockedDecrementLong (
321 PLONG Addend,
322 PKSPIN_LOCK Lock
323 );
324 ULONG
325 STDCALL
326 ExInterlockedExchangeUlong (
327 PULONG Target,
328 ULONG Value,
329 PKSPIN_LOCK Lock
330 );
331 NTSTATUS
332 STDCALL
333 ExInterlockedExtendZone (
334 PZONE_HEADER Zone,
335 PVOID Segment,
336 ULONG SegmentSize,
337 PKSPIN_LOCK Lock
338 );
339
340 /*
341 * PVOID
342 * ExInterlockedFreeToZone (
343 * PZONE_HEADER Zone,
344 * PVOID Block,
345 * PKSPIN_LOCK Lock
346 * );
347 */
348 #define ExInterlockedFreeToZone(Zone,Block,Lock) \
349 ExInterlockedPushEntryList(&(Zone)->FreeList,((PSINGLE_LIST_ENTRY)(Block)),(Lock))
350
351 INTERLOCKED_RESULT
352 STDCALL
353 ExInterlockedIncrementLong (
354 PLONG Addend,
355 PKSPIN_LOCK Lock
356 );
357 PLIST_ENTRY
358 STDCALL
359 ExInterlockedInsertHeadList (
360 PLIST_ENTRY ListHead,
361 PLIST_ENTRY ListEntry,
362 PKSPIN_LOCK Lock
363 );
364 PLIST_ENTRY
365 STDCALL
366 ExInterlockedInsertTailList (
367 PLIST_ENTRY ListHead,
368 PLIST_ENTRY ListEntry,
369 PKSPIN_LOCK Lock
370 );
371 PSINGLE_LIST_ENTRY
372 STDCALL
373 ExInterlockedPopEntryList (
374 PSINGLE_LIST_ENTRY ListHead,
375 PKSPIN_LOCK Lock
376 );
377 PSINGLE_LIST_ENTRY
378 FASTCALL
379 ExInterlockedPopEntrySList (
380 PSLIST_HEADER ListHead,
381 PKSPIN_LOCK Lock
382 );
383 PSINGLE_LIST_ENTRY
384 STDCALL
385 ExInterlockedPushEntryList (
386 PSINGLE_LIST_ENTRY ListHead,
387 PSINGLE_LIST_ENTRY ListEntry,
388 PKSPIN_LOCK Lock
389 );
390 PSINGLE_LIST_ENTRY
391 FASTCALL
392 ExInterlockedPushEntrySList (
393 PSLIST_HEADER ListHead,
394 PSINGLE_LIST_ENTRY ListEntry,
395 PKSPIN_LOCK Lock
396 );
397
398 VOID
399 ExInterlockedRemoveEntryList (
400 PLIST_ENTRY ListHead,
401 PLIST_ENTRY Entry,
402 PKSPIN_LOCK Lock
403 );
404
405 PLIST_ENTRY
406 STDCALL
407 ExInterlockedRemoveHeadList (
408 PLIST_ENTRY Head,
409 PKSPIN_LOCK Lock
410 );
411
412 /*
413 * BOOLEAN
414 * ExIsFullZone (
415 * PZONE_HEADER Zone
416 * );
417 */
418 #define ExIsFullZone(Zone) \
419 ((Zone)->FreeList.Next==(PSINGLE_LIST_ENTRY)NULL)
420
421 /*
422 * BOOLEAN
423 * ExIsObjectInFirstZoneSegment (
424 * PZONE_HEADER Zone,
425 * PVOID Object
426 * );
427 */
428 #define ExIsObjectInFirstZoneSegment(Zone,Object) \
429 (((PUCHAR)(Object)>=(PUCHAR)(Zone)->SegmentList.Next) && \
430 ((PUCHAR)(Object)<(PUCHAR)(Zone)->SegmentList.Next+(Zone)->TotalSegmentSize))
431
432 BOOLEAN
433 STDCALL
434 ExIsProcessorFeaturePresent (
435 IN ULONG ProcessorFeature
436 );
437
438 BOOLEAN
439 STDCALL
440 ExIsResourceAcquiredExclusiveLite (
441 PERESOURCE Resource
442 );
443
444 ULONG
445 STDCALL
446 ExIsResourceAcquiredSharedLite (
447 PERESOURCE Resource
448 );
449
450 VOID
451 STDCALL
452 ExLocalTimeToSystemTime (
453 PLARGE_INTEGER LocalTime,
454 PLARGE_INTEGER SystemTime
455 );
456
457 VOID
458 STDCALL
459 ExNotifyCallback (
460 IN PVOID CallbackObject,
461 IN PVOID Argument1,
462 IN PVOID Argument2
463 );
464
465 VOID
466 STDCALL
467 ExPostSystemEvent (
468 ULONG Unknown1,
469 ULONG Unknown2,
470 ULONG Unknown3
471 );
472
473 /*
474 * USHORT
475 * ExQueryDepthSList (
476 * PSLIST_HEADER SListHead
477 * );
478 */
479 #define ExQueryDepthSList(ListHead) \
480 (USHORT)(ListHead)->s.Depth
481
482 VOID
483 STDCALL
484 ExQueueWorkItem (
485 PWORK_QUEUE_ITEM WorkItem,
486 WORK_QUEUE_TYPE QueueType
487 );
488 VOID
489 STDCALL
490 ExRaiseAccessViolation (
491 VOID
492 );
493 VOID
494 STDCALL
495 ExRaiseDatatypeMisalignment (
496 VOID
497 );
498 VOID
499 STDCALL
500 ExRaiseStatus (
501 NTSTATUS Status
502 );
503
504 PVOID
505 STDCALL
506 ExRegisterCallback (
507 IN PCALLBACK_OBJECT CallbackObject,
508 IN PCALLBACK_FUNCTION CallbackFunction,
509 IN PVOID CallbackContext
510 );
511
512 VOID
513 STDCALL
514 ExReinitializeResourceLite (
515 PERESOURCE Resource
516 );
517 /* ReactOS Specific: begin */
518 VOID
519 FASTCALL
520 ExReleaseFastMutex (
521 PFAST_MUTEX Mutex
522 );
523 /* ReactOS Specific: end */
524 VOID
525 FASTCALL
526 ExReleaseFastMutexUnsafe (
527 PFAST_MUTEX Mutex
528 );
529 /*
530 VOID
531 STDCALL
532 ExReleaseResource (
533 PERESOURCE Resource
534 );
535 */
536 #define ExReleaseResource(Resource) \
537 (ExReleaseResourceLite (Resource))
538
539 VOID
540 FASTCALL
541 ExReleaseResourceLite (
542 PERESOURCE Resource
543 );
544 VOID
545 STDCALL
546 ExReleaseResourceForThread (
547 PERESOURCE Resource,
548 ERESOURCE_THREAD ResourceThreadId
549 );
550 VOID
551 STDCALL
552 ExReleaseResourceForThreadLite (
553 PERESOURCE Resource,
554 ERESOURCE_THREAD ResourceThreadId
555 );
556
557 VOID
558 STDCALL
559 ExSetResourceOwnerPointer (
560 IN PERESOURCE Resource,
561 IN PVOID OwnerPointer
562 );
563
564 VOID
565 STDCALL
566 ExSystemTimeToLocalTime (
567 PLARGE_INTEGER SystemTime,
568 PLARGE_INTEGER LocalTime
569 );
570
571 BOOLEAN
572 FASTCALL
573 ExTryToAcquireFastMutex (
574 PFAST_MUTEX FastMutex
575 );
576
577 BOOLEAN
578 STDCALL
579 ExTryToAcquireResourceExclusiveLite (
580 PERESOURCE Resource
581 );
582
583 VOID
584 STDCALL
585 ExUnregisterCallback (
586 IN PVOID CallbackRegistration
587 );
588
589
590 /*
591 * PVOID
592 * ExAllocateFromNPagedLookasideList (
593 * PNPAGED_LOOKASIDE_LIST LookSide
594 * );
595 *
596 * FUNCTION:
597 * Removes (pops) the first entry from the specified nonpaged
598 * lookaside list.
599 *
600 * ARGUMENTS:
601 * Lookaside = Pointer to a nonpaged lookaside list
602 *
603 * RETURNS:
604 * Address of the allocated list entry
605 */
606 static
607 inline
608 PVOID
609 ExAllocateFromNPagedLookasideList (
610 IN PNPAGED_LOOKASIDE_LIST Lookaside
611 )
612 {
613 PVOID Entry;
614
615 Lookaside->TotalAllocates++;
616 Entry = ExInterlockedPopEntrySList (&Lookaside->ListHead,
617 &Lookaside->Lock);
618 if (Entry == NULL)
619 {
620 Lookaside->AllocateMisses++;
621 Entry = (Lookaside->Allocate)(Lookaside->Type,
622 Lookaside->Size,
623 Lookaside->Tag);
624 }
625
626 return Entry;
627 }
628
629 PVOID
630 STDCALL
631 ExAllocateFromPagedLookasideList (
632 PPAGED_LOOKASIDE_LIST LookSide
633 );
634
635 VOID
636 STDCALL
637 ExDeleteNPagedLookasideList (
638 PNPAGED_LOOKASIDE_LIST Lookaside
639 );
640
641 VOID
642 STDCALL
643 ExDeletePagedLookasideList (
644 PPAGED_LOOKASIDE_LIST Lookaside
645 );
646
647
648 /*
649 * VOID
650 * ExFreeToNPagedLookasideList (
651 * PNPAGED_LOOKASIDE_LIST Lookaside,
652 * PVOID Entry
653 * );
654 *
655 * FUNCTION:
656 * Inserts (pushes) the specified entry into the specified
657 * nonpaged lookaside list.
658 *
659 * ARGUMENTS:
660 * Lookaside = Pointer to the nonpaged lookaside list
661 * Entry = Pointer to the entry that is inserted in the lookaside list
662 */
663 static
664 inline
665 VOID
666 ExFreeToNPagedLookasideList (
667 IN PNPAGED_LOOKASIDE_LIST Lookaside,
668 IN PVOID Entry
669 )
670 {
671 Lookaside->TotalFrees++;
672 if (ExQueryDepthSList (&Lookaside->ListHead) >= Lookaside->MinimumDepth)
673 {
674 Lookaside->FreeMisses++;
675 (Lookaside->Free)(Entry);
676 }
677 else
678 {
679 ExInterlockedPushEntrySList (&Lookaside->ListHead,
680 (PSINGLE_LIST_ENTRY)Entry,
681 &Lookaside->Lock);
682 }
683 }
684
685 VOID
686 STDCALL
687 ExFreeToPagedLookasideList (
688 PPAGED_LOOKASIDE_LIST Lookaside,
689 PVOID Entry
690 );
691
692 VOID
693 STDCALL
694 ExInitializeNPagedLookasideList (
695 PNPAGED_LOOKASIDE_LIST Lookaside,
696 PALLOCATE_FUNCTION Allocate,
697 PFREE_FUNCTION Free,
698 ULONG Flags,
699 ULONG Size,
700 ULONG Tag,
701 USHORT Depth
702 );
703 VOID
704 STDCALL
705 ExInitializePagedLookasideList (
706 PPAGED_LOOKASIDE_LIST Lookaside,
707 PALLOCATE_FUNCTION Allocate,
708 PFREE_FUNCTION Free,
709 ULONG Flags,
710 ULONG Size,
711 ULONG Tag,
712 USHORT Depth
713 );
714
715
716 ULONG
717 FASTCALL
718 ExfInterlockedAddUlong (
719 IN PULONG Addend,
720 IN ULONG Increment,
721 IN PKSPIN_LOCK Lock
722 );
723
724 INTERLOCKED_RESULT
725 FASTCALL
726 Exfi386InterlockedIncrementLong (
727 IN PLONG Addend
728 );
729
730 INTERLOCKED_RESULT
731 FASTCALL
732 Exfi386InterlockedDecrementLong (
733 IN PLONG Addend
734 );
735
736 ULONG
737 FASTCALL
738 Exfi386InterlockedExchangeUlong (
739 IN PULONG Target,
740 IN ULONG Value
741 );
742
743 INTERLOCKED_RESULT
744 STDCALL
745 Exi386InterlockedIncrementLong (
746 IN PLONG Addend
747 );
748
749 INTERLOCKED_RESULT
750 STDCALL
751 Exi386InterlockedDecrementLong (
752 IN PLONG Addend
753 );
754
755 ULONG
756 STDCALL
757 Exi386InterlockedExchangeUlong (
758 IN PULONG Target,
759 IN ULONG Value
760 );
761
762 /*
763 LONG
764 FASTCALL
765 InterlockedCompareExchange (
766 PLONG Target,
767 LONG Value,
768 LONG Reference
769 );
770 */
771 PVOID
772 FASTCALL
773 InterlockedCompareExchange (
774 PVOID * Destination,
775 PVOID Exchange,
776 PVOID Comperand
777 );
778 #ifdef _GNU_H_WINDOWS_H
779 #ifdef InterlockedDecrement
780 #undef InterlockedDecrement
781 #undef InterlockedExchange
782 #undef InterlockedExchangeAdd
783 #undef InterlockedIncrement
784 #endif /* def InterlockedDecrement */
785 #endif /* def _GNU_H_WINDOWS_H */
786 LONG
787 FASTCALL
788 InterlockedDecrement (
789 PLONG Addend
790 );
791 LONG
792 FASTCALL
793 InterlockedExchange (
794 PLONG Target,
795 LONG Value
796 );
797 LONG
798 FASTCALL
799 InterlockedExchangeAdd (
800 PLONG Addend,
801 LONG Value
802 );
803 LONG
804 FASTCALL
805 InterlockedIncrement (
806 PLONG Addend
807 );
808
809 /*---*/
810
811 typedef
812 unsigned int
813 (exception_hook) (
814 CONTEXT * c,
815 unsigned int exp
816 );
817 unsigned int
818 ExHookException (
819 exception_hook fn,
820 unsigned int exp
821 );
822
823 /* BEGIN REACTOS ONLY */
824
825 BOOLEAN STDCALL
826 ExInitializeBinaryTree(IN PBINARY_TREE Tree,
827 IN PKEY_COMPARATOR Compare);
828
829 VOID STDCALL
830 ExDeleteBinaryTree(IN PBINARY_TREE Tree);
831
832 VOID STDCALL
833 ExInsertBinaryTree(IN PBINARY_TREE Tree,
834 IN PVOID Key,
835 IN PVOID Value);
836
837 BOOLEAN STDCALL
838 ExSearchBinaryTree(IN PBINARY_TREE Tree,
839 IN PVOID Key,
840 OUT PVOID * Value);
841
842 BOOLEAN STDCALL
843 ExRemoveBinaryTree(IN PBINARY_TREE Tree,
844 IN PVOID Key,
845 IN PVOID * Value);
846
847 BOOLEAN STDCALL
848 ExInitializeSplayTree(IN PSPLAY_TREE Tree,
849 IN PKEY_COMPARATOR Compare,
850 IN BOOLEAN Weighted);
851
852 VOID STDCALL
853 ExDeleteSplayTree(IN PSPLAY_TREE Tree);
854
855 VOID STDCALL
856 ExInsertSplayTree(IN PSPLAY_TREE Tree,
857 IN PVOID Key,
858 IN PVOID Value);
859
860 BOOLEAN STDCALL
861 ExSearchSplayTree(IN PSPLAY_TREE Tree,
862 IN PVOID Key,
863 OUT PVOID * Value);
864
865 BOOLEAN STDCALL
866 ExRemoveSplayTree(IN PSPLAY_TREE Tree,
867 IN PVOID Key,
868 IN PVOID * Value);
869
870 BOOLEAN STDCALL
871 ExWeightOfSplayTree(IN PSPLAY_TREE Tree,
872 OUT PULONG Weight);
873
874 BOOLEAN STDCALL
875 ExInitializeHashTable(IN PHASH_TABLE HashTable,
876 IN ULONG HashTableSize,
877 IN PKEY_COMPARATOR Compare OPTIONAL);
878
879 VOID STDCALL
880 ExDeleteHashTable(IN PHASH_TABLE HashTable);
881
882 VOID STDCALL
883 ExInsertHashTable(IN PHASH_TABLE HashTable,
884 IN PVOID Key,
885 IN ULONG KeyLength,
886 IN PVOID Value);
887
888 BOOLEAN STDCALL
889 ExSearchHashTable(IN PHASH_TABLE HashTable,
890 IN PVOID Key,
891 IN ULONG KeyLength,
892 OUT PVOID * Value);
893
894 BOOLEAN STDCALL
895 ExRemoveHashTable(IN PHASH_TABLE HashTable,
896 IN PVOID Key,
897 IN ULONG KeyLength,
898 IN PVOID * Value);
899
900 /* END REACTOS ONLY */
901
902 #endif /* ndef _NTOS_EXFUNCS_H */