mirror of
https://github.com/darlinghq/darling.git
synced 2025-03-04 07:47:14 +00:00
Fix cvwait hangs
This commit is contained in:
parent
aef0882331
commit
abed0c399d
@ -6,7 +6,7 @@
|
||||
#include "../../../../lkm/api.h"
|
||||
#include "../simple.h"
|
||||
|
||||
long sys_psynch_cvwait(void* cv, uint32_t cvgen, uint32_t cvugen, void* mutex, uint32_t mgen,
|
||||
long sys_psynch_cvwait(void* cv, uint32_t cvgen, uint32_t cvugen, void* mutex, uint64_t mgen,
|
||||
uint32_t ugen, uint64_t sec, uint32_t usec)
|
||||
{
|
||||
struct psynch_cvwait_args args = {
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define LINUX_PSYNCH_CVWAIT_H
|
||||
#include <stdint.h>
|
||||
|
||||
long sys_psynch_cvwait(void* cv, uint32_t cvgen, uint32_t cvugen, void* mutex, uint32_t mgen,
|
||||
long sys_psynch_cvwait(void* cv, uint32_t cvgen, uint32_t cvugen, void* mutex, uint64_t mgen,
|
||||
uint32_t ugen, uint64_t sec, uint32_t usec);
|
||||
|
||||
#endif
|
||||
|
@ -20,6 +20,11 @@ long sys_ulock_wait(uint32_t operation, void* addr, uint64_t value, uint32_t tim
|
||||
struct timespec ts;
|
||||
bool no_errno = operation & ULF_NO_ERRNO;
|
||||
|
||||
|
||||
char dbg[100];
|
||||
__simple_sprintf(dbg, "ulock_wait on %p for %d ns", addr, timeout / 1000);
|
||||
lkm_call(0x1028, dbg);
|
||||
|
||||
if (timeout > 0)
|
||||
{
|
||||
ts.tv_sec = timeout / 1000*1000;
|
||||
|
@ -12,6 +12,10 @@ long sys_ulock_wake(uint32_t operation, void* addr, uint64_t wake_value)
|
||||
int ret, op;
|
||||
bool no_errno = operation & ULF_NO_ERRNO;
|
||||
|
||||
char buf[100];
|
||||
__simple_sprintf(buf, "ulock_wake on %p", addr);
|
||||
lkm_call(0x1024, buf);
|
||||
|
||||
op = operation & UL_OPCODE_MASK;
|
||||
if (op == UL_COMPARE_AND_WAIT || op == UL_UNFAIR_LOCK)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user