[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: Tumblr_l_5897061736082.png (767 KB, 2048x2480)
767 KB PNG
previous: >>108813613

#define __NR_timer_create            222
#define __NR_timer_settime 223
#define __NR_timer_gettime 224
#define __NR_timer_getoverrun 225
#define __NR_timer_delete 226

https://man7.org/linux/man-pages/man2/timer_create.2.html
https://man7.org/linux/man-pages/man2/timer_delete.2.html
https://man7.org/linux/man-pages/man2/timer_settime.2.html
https://man7.org/linux/man-pages/man2/timer_getoverrun.2.html

tl;dr:
manage posix timers

similar to the clock syscalls we've discussed before, except these can be armed and fire after a given amount of time has elapsed.

not part of the vdso, so far as i can tell, which is a bit surprising! you'd expect something like this to fit into there nicely. i guess the idea is you're not constantly polling it like you are a clock? so it's only expected to be accessed when you create/destroy, arm/disarm, and when it fires

i won't ask if people have used this before, because this is the sort of thing that gets used all the time by everyone. what i will ask is what's the most obscure clock type you've had occasion to use, and what were the circumstances?

relevant resources:
man man

man syscalls

https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
>>
>>108820540
Neat. I'm looking into writing a concurrency library for my own C programs and figured I'd need something like this when I get to it.
>>
>>108820540
I want to princess-carry a cute schoolgirl princess-carrying a cute teacher!
>>
>>108820540
>>108820750
amm/map vibes frfr
>>
bampu
>>
>i won't ask if people have used this before, because this is the sort of thing that gets used all the time by everyone
when do you want signals over timerfd? seems less of a hassle and error prone to me. of course you need an eventloop then, but you'd probably also need it with signals cause you are so limited about what you can do in a signal handler
>>
any peon here dare to artisan my runtime with NIX syscalls written in cyber-coded assembly?

whats the point of chewing this textual gum, are you moo-moo or something?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.