MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / timerfd_create

Method timerfd_create

source/kernel/kprocess.cpp:2533–2545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2531}
2532
2533U32 KProcess::timerfd_create(U32 clockid, U32 flags) {
2534 std::shared_ptr<KTimer> o = std::make_shared<KTimer>();
2535 KFileDescriptorPtr fd = allocFileDescriptor(o, K_O_RDONLY, 0, -1, 0);
2536
2537 if (flags & K_O_CLOEXEC) {
2538 fd->descriptorFlags |= FD_CLOEXEC;
2539 }
2540 if (flags & K_O_NONBLOCK) {
2541 fd->accessFlags |= K_O_NONBLOCK;
2542 o->setBlocking(false);
2543 }
2544 return fd->handle;
2545}
2546
2547U32 KProcess::timerfd_settime(U32 fildes, U32 flags, U32 newValue, U32 oldValue) {
2548 KFileDescriptorPtr fd = getFileDescriptor(fildes);

Callers 1

syscall_timerfd_createFunction · 0.80

Calls 1

setBlockingMethod · 0.45

Tested by

no test coverage detected