Monthly Archives: October 2014

system call and errno

Recently was debugging something related with sched_getaffinity() and got some error and I went to look into the kernel source code for its implementation. And interesting even though the syscall implementation returns various error code, the glibc API obviously always … Continue reading

Leave a comment

How to clear screen in raw way?

Someone asked this question and it’s an interesting one since we have most get used to clear screen simply with “clear” command, but what happened in the background. For me, I use putty as my console and set my term … Continue reading

Leave a comment

Kdb with C style printf() function extension support

Recently a colleague talked about the possibility of extending kdb with the support of C style printf() function so he can do it in q with something like “qprintf[“%s is %05d”;(“foo”;foo)]“. This is an interesting idea and q does allow … Continue reading

Leave a comment

Dekker algorithm on X86

People have known Dekker algorithms for a long time though it’s more of text book sense rather than anyone using it for real. The pseudo code can be found in wiki: http://en.wikipedia.org/wiki/Dekker’s_algorithm and it’s as simple as below. The wiki … Continue reading

Leave a comment