All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantinos Chalas <konchalas@gmail.com>
To: xenomai@xenomai.org
Subject: [Xenomai] timer_create( ) invalid argument
Date: Thu, 27 Aug 2015 23:40:48 +0200	[thread overview]
Message-ID: <55DF83E0.1060006@gmail.com> (raw)

Hello,

I have been trying to port some code from the Linux Kernel to the Cobalt 
Kernel, with no success.

When trying to call timer_create( ), i am getting the error 
timer_create: Invalid argument

I made the code snippet as small as possible.

#include <time.h>
#include <signal.h>
#include <stdio.h>

void timerfunction(union sigval handler)
{
         printf("timerfunction hello\n");
}

int main(int argc, char** argv)
{
         timer_t t;

         struct sigevent se;

         se.sigev_value.sival_ptr = 0;
         se.sigev_signo = 0;
         se.sigev_notify =  SIGEV_THREAD_ID;

         se.sigev_notify_attributes = 0;
         se.sigev_notify_function = timerfunction;

         if (timer_create(CLOCK_REALTIME, &se, &t) != 0) {
                 perror("timer_create");
         }
         return 0;
}


             reply	other threads:[~2015-08-27 21:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 21:40 Konstantinos Chalas [this message]
2015-08-27 23:49 ` [Xenomai] timer_create( ) invalid argument Gilles Chanteperdrix
2015-08-28  6:34   ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55DF83E0.1060006@gmail.com \
    --to=konchalas@gmail.com \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.