Is Linux timer a process

view story

http://stackoverflow.com – I'm trying to understand timers in linux to use it in my application, I've collected code from multiple sources and made the following program #include <stdlib.h> #include <unistd.h> #include <stdio.h> #include <signal.h> #include <time.h> #include <pthread.h> pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; #define CLOCKID CLOCK_REALTIME #define SIG SIGUSR1 timer_t timerid; void *print_message_function( void *ptr ); static void handler(int sig, siginfo_t *si, void *uc) { pthread_mutex_lock( &mutex1 ); printf("Caught signal %d from timer\n", (HowTos)