ReactOS  0.4.14-dev-384-g5b37caa
sys_arch.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _sys_sem_t
 
struct  _sys_mbox_t
 
struct  _LWIP_MESSAGE_CONTAINER
 

Macros

#define sys_jiffies()   sys_now()
 
#define SYS_MBOX_NULL   NULL
 
#define SYS_SEM_NULL   NULL
 
#define SYS_ARCH_NULL   NULL
 

Typedefs

typedef struct _sys_sem_t sys_sem_t
 
typedef struct _sys_mbox_t sys_mbox_t
 
typedef KIRQL sys_prot_t
 
typedef u32_t sys_thread_t
 
typedef struct _LWIP_MESSAGE_CONTAINER LWIP_MESSAGE_CONTAINER
 
typedef struct _LWIP_MESSAGE_CONTAINERPLWIP_MESSAGE_CONTAINER
 

Functions

void sys_arch_protect (sys_prot_t *lev)
 
void sys_arch_unprotect (sys_prot_t lev)
 
void sys_shutdown (void)
 

Macro Definition Documentation

◆ SYS_ARCH_NULL

#define SYS_ARCH_NULL   NULL

Definition at line 33 of file sys_arch.h.

◆ sys_jiffies

#define sys_jiffies (   void)    sys_now()

Definition at line 28 of file sys_arch.h.

◆ SYS_MBOX_NULL

#define SYS_MBOX_NULL   NULL

Definition at line 31 of file sys_arch.h.

◆ SYS_SEM_NULL

#define SYS_SEM_NULL   NULL

Definition at line 32 of file sys_arch.h.

Typedef Documentation

◆ LWIP_MESSAGE_CONTAINER

◆ PLWIP_MESSAGE_CONTAINER

◆ sys_mbox_t

◆ sys_prot_t

typedef KIRQL sys_prot_t

Definition at line 18 of file sys_arch.h.

◆ sys_sem_t

◆ sys_thread_t

Definition at line 20 of file sys_arch.h.

Function Documentation

◆ sys_arch_protect()

void sys_arch_protect ( sys_prot_t lev)

Definition at line 38 of file sys_arch.c.

39 {
40  /* Preempt the dispatcher */
42 }
#define KeRaiseIrql(irql, oldIrql)
Definition: env_spec_w32.h:597
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696

◆ sys_arch_unprotect()

void sys_arch_unprotect ( sys_prot_t  lev)

Definition at line 45 of file sys_arch.c.

46 {
47  KeLowerIrql(lev);
48 }
#define KeLowerIrql(oldIrql)
Definition: env_spec_w32.h:602

◆ sys_shutdown()

void sys_shutdown ( void  )

Definition at line 337 of file sys_arch.c.

338 {
339  PLIST_ENTRY CurrentEntry;
340  thread_t Container;
341 
342  /* Set the termination event */
344 
345  /* Loop through the thread list and wait for each to die */
346  while ((CurrentEntry = ExInterlockedRemoveHeadList(&ThreadListHead, &ThreadListLock)))
347  {
348  Container = CONTAINING_RECORD(CurrentEntry, struct _thread_t, ListEntry);
349 
350  if (Container->ThreadFunction)
351  {
352  KeWaitForSingleObject(Container->Handle,
353  Executive,
354  KernelMode,
355  FALSE,
356  NULL);
357 
358  ZwClose(Container->Handle);
359  }
360  }
361 
364 }
HANDLE Handle
Definition: sys_arch.c:22
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NPAGED_LOOKASIDE_LIST MessageLookasideList
Definition: sys_arch.c:15
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:159
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
PLIST_ENTRY NTAPI ExInterlockedRemoveHeadList(IN OUT PLIST_ENTRY ListHead, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:166
smooth NULL
Definition: ftsmooth.c:416
KEVENT TerminationEvent
Definition: sys_arch.c:14
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
Definition: typedefs.h:117
NPAGED_LOOKASIDE_LIST QueueEntryLookasideList
Definition: sys_arch.c:16
void(* ThreadFunction)(void *arg)
Definition: sys_arch.c:23
static KSPIN_LOCK ThreadListLock
Definition: sys_arch.c:12
static LIST_ENTRY ThreadListHead
Definition: sys_arch.c:11
#define IO_NO_INCREMENT
Definition: iotypes.h:566
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:174

Referenced by LibIPShutdown().