All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Feretich <bob.feretich@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-help] Native rt_event_bind() question.
Date: Sun, 05 Sep 2010 15:38:39 -0700	[thread overview]
Message-ID: <4C841BEF.50708@domain.hid> (raw)

  I am confused about the operation of the Native rt_event_bind() 
function and I have not found any example of its use.

The documentation states...
int rt_event_bind (RT_EVENT * event, const char * name, RTIME timeout)
Parameters:
...
event The address of an event flag group descriptor retrieved by the 
operation. Contents of
this memory is undefined upon failure.
...

Is the user-space task supposed to provide memory for the RT_EVENT, ...
example:
RT_EVENT event_structure;
...
rt_event_bind (&event_structure,...)

Or, does the user-space program just provide a pointer variable to 
retain the event structure provided to it by the function?
example:
RT_EVENT *event_pointer;
...
rt_event_bind (event_pointer,...)

Neither seems to work correctly, the former only allocates a word of memory.
printf("sizeof(event_structure)=%d", sizeof(event_structure) );
Prints 4. This seems too small.

The latter fails with an error code -14 (EFAULT).

Regards,
Bob Feretich



             reply	other threads:[~2010-09-05 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-05 22:38 Bob Feretich [this message]
2010-09-06  4:56 ` [Xenomai-help] Native rt_event_bind() question Philippe Gerum
2010-09-06  8:34   ` Bob Feretich
2010-09-06  9:33     ` 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=4C841BEF.50708@domain.hid \
    --to=bob.feretich@domain.hid \
    --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.