Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9832 → Rev 9833

/drivers/ddk/core.S
26,9 → 26,13
 
.global _FreeKernelSpace
.global _FreePage
.global _FS_Service
 
.global _GetClockNs
.global _GetCpuFreq
 
.global _GetCurrSlot
 
.global _GetDisplay
.global _GetEvent
.global _GetPgAddr
83,8 → 87,6
.global _WaitEvent
.global _WaitEventTimeout
 
.global _FS_Service
 
.def _AcpiGetRootPtr; .scl 2; .type 32; .endef
 
.def _AllocKernelSpace; .scl 2; .type 32; .endef
109,10 → 111,11
 
.def _FreeKernelSpace; .scl 2; .type 32; .endef
.def _FreePage; .scl 2; .type 32; .endef
.def _FS_Service; .scl 2; .type 32; .endef
 
.def _GetClockNs; .scl 2; .type 32; .endef
 
.def _GetDisplay; .scl 2; .type 32; .endef
.def _GetCurrSlot; .scl 2; .type 32; .endef
 
.def _GetDisplay; .scl 2; .type 32; .endef
.def _GetEvent; .scl 2; .type 32; .endef
167,8 → 170,6
.def _WaitEvent; .scl 2; .type 32; .endef
.def _WaitEventTimeout; .scl 2; .type 32; .endef
.def _FS_Service; .scl 2; .type 32; .endef
_AcpiGetRootPtr:
 
_AllocKernelSpace:
195,8 → 196,13
_FreeKernelSpace:
_FreePage:
 
_FS_Service:
 
_GetClockNs:
_GetCpuFreq:
 
_GetCurrSlot:
 
_GetDisplay:
_GetEvent:
_GetPCIList:
247,9 → 253,6
_UserFree:
_WaitEvent:
_WaitEventTimeout:
 
_FS_Service:
 
ret
 
.section .drectve
278,8 → 281,13
.ascii " -export:FreeKernelSpace" # stdcall
.ascii " -export:FreePage" #
 
.ascii " -export:FS_Service" # watch system call 70
 
.ascii " -export:GetClockNs" #
.ascii " -export:GetCpuFreq" #
 
.ascii " -export:GetCurrSlot"
 
.ascii " -export:GetDisplay" # stdcall
.ascii " -export:GetEvent" #
.ascii " -export:GetPCIList" #
290,7 → 298,6
.ascii " -export:GetStackBase" #
.ascii " -export:GetWindowRect" # fastcall
 
 
.ascii " -export:KernelAlloc" # stdcall
.ascii " -export:KernelFree" # stdcall
 
332,4 → 339,3
 
.ascii " -export:WaitEvent" # stdcall
.ascii " -export:WaitEventTimeout" # stdcall
.ascii " -export:FS_Service" # watch system call 70
/drivers/ddk/linux/mutex.c
25,22 → 25,6
#include <linux/spinlock.h>
#include <syscall.h>
 
struct kos_taskdata
{
u32 event_mask;
u32 pid;
u16 r0;
u8 state;
u8 r1;
u16 r2;
u8 wnd_number;
u8 r3;
u32 mem_start;
u32 counter_sum;
u32 counter_add;
u32 cpu_usage;
}__attribute__((packed));
 
static inline void mutex_set_owner(struct mutex *lock)
{
}
144,11 → 128,12
*/
flags = safe_cli();
list_for_each_entry(cur, &lock->base.wait_list, list) {
((struct kos_taskdata*)cur->task)->state = 0;
((struct kos_appdata*)cur->task)->state = KOS_SLOT_STATE_RUNNING;
}
safe_sti(flags);
}
 
static __always_inline void
ww_mutex_set_context_slowpath(struct ww_mutex *lock,
struct ww_acquire_ctx *ctx)
{
162,7 → 147,7
* so they can recheck if they have to back off.
*/
list_for_each_entry(cur, &lock->base.wait_list, list) {
((struct kos_taskdata*)cur->task)->state = 0;
((struct kos_appdata*)cur->task)->state = KOS_SLOT_STATE_RUNNING;
}
}
 
170,13 → 155,13
{
struct mutex *lock;
struct mutex_waiter waiter;
struct kos_taskdata* taskdata;
struct kos_appdata *appdata;
u32 eflags;
int ret = 0;
 
lock = &ww->base;
taskdata = (struct kos_taskdata*)(0x80003010);
waiter.task = (u32*)taskdata;
appdata = GetCurrSlot();
waiter.task = appdata;
 
eflags = safe_cli();
 
192,7 → 177,7
if (ret)
goto err;
};
taskdata->state = 1;
appdata->state = KOS_SLOT_STATE_SUSPENDED;
change_task();
};