* [Xenomai-help] Accessing the dev_private field of the RTDM driver context @ 2006-02-22 13:29 Jeroen Van den Keybus 2006-02-22 13:42 ` Jan Kiszka 0 siblings, 1 reply; 3+ messages in thread From: Jeroen Van den Keybus @ 2006-02-22 13:29 UTC (permalink / raw) To: xenomai@xenomai.org [-- Attachment #1: Type: text/plain, Size: 494 bytes --] The dev_private data field of an rtdm_dev_context is defined as char[0]. How do I access such a field properly (given the fact that I defined a nonzero context_size in the rtdm_device structure during driver registration) ? E.g. trying to do: (struct my_struct *)context->dev_private = NULL; results in: error: incompatible types in assignment I _am_ able to compare though: if ((struct my_struct *)context->dev_private == NULL) ... seems to compile fine. Jeroen. [-- Attachment #2: Type: text/html, Size: 577 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Accessing the dev_private field of the RTDM driver context 2006-02-22 13:29 [Xenomai-help] Accessing the dev_private field of the RTDM driver context Jeroen Van den Keybus @ 2006-02-22 13:42 ` Jan Kiszka 2006-02-22 14:29 ` Jeroen Van den Keybus 0 siblings, 1 reply; 3+ messages in thread From: Jan Kiszka @ 2006-02-22 13:42 UTC (permalink / raw) To: Jeroen Van den Keybus; +Cc: xenomai@xenomai.org [-- Attachment #1: Type: text/plain, Size: 772 bytes --] Jeroen Van den Keybus wrote: > The dev_private data field of an rtdm_dev_context is defined as char[0]. How > do I access such a field properly (given the fact that I defined a nonzero > context_size in the rtdm_device structure during driver registration) ? > > E.g. trying to do: > > (struct my_struct *)context->dev_private = NULL; > > results in: > > error: incompatible types in assignment > > I _am_ able to compare though: > > if ((struct my_struct *)context->dev_private == NULL) > ... > > seems to compile fine. > > > Jeroen. > context->dev_private does not contain an address, it IS the start address of your private date. It's size is specified during device registration. See existing drivers for usage examples. Jan [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 250 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai-help] Accessing the dev_private field of the RTDM driver context 2006-02-22 13:42 ` Jan Kiszka @ 2006-02-22 14:29 ` Jeroen Van den Keybus 0 siblings, 0 replies; 3+ messages in thread From: Jeroen Van den Keybus @ 2006-02-22 14:29 UTC (permalink / raw) To: Jan Kiszka; +Cc: xenomai@xenomai.org [-- Attachment #1: Type: text/plain, Size: 52 bytes --] Indeed. Thanks and sorry for bothering. Jeroen. [-- Attachment #2: Type: text/html, Size: 70 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-02-22 14:29 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-02-22 13:29 [Xenomai-help] Accessing the dev_private field of the RTDM driver context Jeroen Van den Keybus 2006-02-22 13:42 ` Jan Kiszka 2006-02-22 14:29 ` Jeroen Van den Keybus
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.