Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 4124 → Rev 4125

/drivers/ddk/core.S
10,6 → 10,7
 
.global _AttachIntHandler
 
.global _CancelTimerHS
.global _CreateEvent
.global _CreateObject
.global _CreateRingBuffer
64,7 → 65,7
.global _SetScreen
.global _SysMsgBoardStr
 
.global _TimerHs
.global _TimerHS
 
.global _UserAlloc
.global _UserFree
79,6 → 80,7
 
.def _AttachIntHandler; .scl 2; .type 32; .endef
 
.def _CancelTimerHS; .scl 2; .type 32; .endef
.def _CreateEvent; .scl 2; .type 32; .endef
.def _CreateObject; .scl 2; .type 32; .endef
.def _CreateRingBuffer; .scl 2; .type 32; .endef
133,7 → 135,7
.def _SetKeyboardData; .scl 2; .type 32; .endef
.def _SysMsgBoardStr; .scl 2; .type 32; .endef
 
.def _TimerHs; .scl 2; .type 32; .endef
.def _TimerHS; .scl 2; .type 32; .endef
 
.def _UserAlloc; .scl 2; .type 32; .endef
.def _UserFree; .scl 2; .type 32; .endef
148,6 → 150,7
 
_AttachIntHandler:
 
_CancelTimerHS:
_CreateEvent:
_CreateObject:
_CreateRingBuffer:
202,7 → 205,7
_SetScreen:
_SysMsgBoardStr:
 
_TimerHs:
_TimerHS:
 
_UserAlloc:
_UserFree:
220,6 → 223,7
 
.ascii " -export:AttachIntHandler" # stdcall
 
.ascii " -export:CancelTimerHS" # stfcall
.ascii " -export:CreateEvent" #
.ascii " -export:CreateObject" #
.ascii " -export:CreateRingBuffer" # stdcall
226,10 → 230,8
.ascii " -export:CreateThread" #
 
.ascii " -export:Delay" # stdcall
 
.ascii " -export:DestroyEvent"
.ascii " -export:DestroyObject"
 
.ascii " -export:DiskAdd" # stdcall
.ascii " -export:DiskMediaChanged" # stdcall
 
237,7 → 239,6
.ascii " -export:FreePage" #
 
.ascii " -export:GetCpuFreq" #
 
.ascii " -export:GetDisplay" # stdcall
.ascii " -export:GetEvent" #
.ascii " -export:GetPid" #
276,7 → 277,7
.ascii " -export:SetScreen" # stdcall
.ascii " -export:SysMsgBoardStr" # stdcall
 
.ascii " -export:TimerHs" # stdcall
.ascii " -export:TimerHS" # stdcall
 
.ascii " -export:UserAlloc" # stdcall
.ascii " -export:UserFree" # stdcall
/drivers/ddk/linux/workqueue.c
94,7 → 94,7
// dbgprintf("%s %p queue: %p\n", __FUNCTION__, &dwork->work, wq);
 
work->data = wq;
TimerHs(delay,0, delayed_work_timer_fn, dwork);
TimerHS(delay,0, delayed_work_timer_fn, dwork);
return 1;
}
 
104,3 → 104,20
return queue_delayed_work(system_wq, dwork, delay);
}
 
int mod_timer(struct timer_list *timer, unsigned long expires)
{
int ret = 0;
expires - GetTimerTicks();
 
if(timer->handle)
{
CancelTimerHS(timer->handle);
timer->handle = 0;
ret = 1;
};
 
timer->handle = TimerHS(expires, 0, timer->function, timer->data);
 
return ret;
}
 
/drivers/include/linux/kernel.h
273,10 → 273,17
 
void (*function)(unsigned long);
unsigned long data;
 
// struct tvec_base *base;
u32 handle;
};
 
#define setup_timer(_timer, _fn, _data) \
do { \
(_timer)->function = (_fn); \
(_timer)->data = (_data); \
(_timer)->handle = 0; \
} while (0)
 
 
struct timespec {
long tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
/drivers/include/linux/workqueue.h
61,6 → 61,7
#define alloc_ordered_workqueue(fmt, flags, args...) \
alloc_workqueue(fmt, WQ_UNBOUND | (flags), 1, ##args)
 
bool queue_work(struct workqueue_struct *wq, struct work_struct *work);
int queue_delayed_work(struct workqueue_struct *wq,
struct delayed_work *dwork, unsigned long delay);
 
80,6 → 81,10
(_work)->work.func = _func; \
} while (0)
 
static inline bool schedule_work(struct work_struct *work)
{
return queue_work(system_wq, work);
}
 
 
#endif /* _LINUX_WORKQUEUE_H */
/drivers/include/syscall.h
55,9 → 55,11
addr_t IMPORT GetStackBase(void)__asm__("GetStackBase");
u32_t IMPORT GetPid(void)__asm__("GetPid");
 
u32 STDCALL TimerHs(u32 delay, u32 interval,
void *fn, void *data)asm("TimerHs");
u32 STDCALL TimerHS(u32 delay, u32 interval,
void *fn, void *data)asm("TimerHS");
 
void STDCALL CancelTimerHS(u32 handle)asm("CancelTimerHS");
 
u64 IMPORT GetCpuFreq()__asm__("GetCpuFreq");
 
///////////////////////////////////////////////////////////////////////////////