From 9590d7e626af21c2e118eb187ef51c86701a7f38 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Mon, 6 Jun 2022 03:31:23 +0200 Subject: [PATCH] Remove more Windows code --- os_dep/osdep_service.c | 56 ------------------------------------------ 1 file changed, 56 deletions(-) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 28e464b..851e845 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1212,11 +1212,6 @@ void _rtw_init_sema(_sema *sema, int init_val) #ifdef PLATFORM_FREEBSD sema_init(sema, init_val, "rtw_drv"); #endif -#ifdef PLATFORM_OS_XP - - KeInitializeSemaphore(sema, init_val, SEMA_UPBND); /* count=0; */ - -#endif #ifdef PLATFORM_OS_CE if (*sema == NULL) @@ -1247,11 +1242,6 @@ void _rtw_up_sema(_sema *sema) #ifdef PLATFORM_FREEBSD sema_post(sema); #endif -#ifdef PLATFORM_OS_XP - - KeReleaseSemaphore(sema, IO_NETWORK_INCREMENT, 1, FALSE); - -#endif #ifdef PLATFORM_OS_CE ReleaseSemaphore(*sema, 1, NULL); @@ -1273,13 +1263,6 @@ u32 _rtw_down_sema(_sema *sema) sema_wait(sema); return _SUCCESS; #endif -#ifdef PLATFORM_OS_XP - - if (STATUS_SUCCESS == KeWaitForSingleObject(sema, Executive, KernelMode, TRUE, NULL)) - return _SUCCESS; - else - return _FAIL; -#endif #ifdef PLATFORM_OS_CE if (WAIT_OBJECT_0 == WaitForSingleObject(*sema, INFINITE)) @@ -1310,10 +1293,6 @@ inline void kthread_thread_exit(_completion *comp) #ifdef PLATFORM_OS_CE ExitThread(STATUS_SUCCESS); #endif - -#ifdef PLATFORM_OS_XP - PsTerminateSystemThread(STATUS_SUCCESS); -#endif } inline void _rtw_init_completion(_completion *comp) @@ -1349,11 +1328,6 @@ void _rtw_mutex_init(_mutex *pmutex) #ifdef PLATFORM_FREEBSD mtx_init(pmutex, "", NULL, MTX_DEF | MTX_RECURSE); #endif -#ifdef PLATFORM_OS_XP - - KeInitializeMutex(pmutex, 0); - -#endif #ifdef PLATFORM_OS_CE *pmutex = CreateMutex(NULL, _FALSE, NULL); @@ -1376,10 +1350,6 @@ void _rtw_mutex_free(_mutex *pmutex) #endif -#ifdef PLATFORM_OS_XP - -#endif - #ifdef PLATFORM_OS_CE #endif @@ -1396,11 +1366,6 @@ void _rtw_spinlock_init(_lock *plock) #ifdef PLATFORM_FREEBSD mtx_init(plock, "", NULL, MTX_DEF | MTX_RECURSE); #endif -#ifdef PLATFORM_WINDOWS - - NdisAllocateSpinLock(plock); - -#endif } @@ -1410,12 +1375,6 @@ void _rtw_spinlock_free(_lock *plock) mtx_destroy(plock); #endif -#ifdef PLATFORM_WINDOWS - - NdisFreeSpinLock(plock); - -#endif - } #ifdef PLATFORM_FREEBSD extern PADAPTER prtw_lock; @@ -1449,11 +1408,6 @@ void _rtw_spinlock(_lock *plock) #ifdef PLATFORM_FREEBSD mtx_lock(plock); #endif -#ifdef PLATFORM_WINDOWS - - NdisAcquireSpinLock(plock); - -#endif } @@ -1468,11 +1422,6 @@ void _rtw_spinunlock(_lock *plock) #ifdef PLATFORM_FREEBSD mtx_unlock(plock); #endif -#ifdef PLATFORM_WINDOWS - - NdisReleaseSpinLock(plock); - -#endif } @@ -1487,11 +1436,6 @@ void _rtw_spinlock_ex(_lock *plock) #ifdef PLATFORM_FREEBSD mtx_lock(plock); #endif -#ifdef PLATFORM_WINDOWS - - NdisDprAcquireSpinLock(plock); - -#endif }