Skip to content

Tag: sleep

sleep 0 has special meaning?

I’m seeing a lot of usages of sleep 0 in my one of my client project. The code look something like this. Reading through some of the answer of SO like this it seems that sleep 0 has some significance. What I want to known now is that does scheduling for other thread to run (if they are waiting to

SIGALRM, interval timers and problems with sleep()

I am working with porting one of our embedded microcontroller libraries to linux and writing a python wrapper around it. One of my low level modules depends on a callback that gets called every 10ms. This callback counts up software timers that each have callbacks of their own. These timers are used all over …

nasm assembly linux timer or sleep

I’m trying to find a way to make my code wait for two seconds before proceeding. I’m using nasm for Linux in protected mode, so I can only use int 80h. I found a syscall called “alarm” (27) and another called “pause” (29). However, when I try to use those, the program waits…