how to use rtems_task_variable_add ?
Fernando RUIZ CASAS
correo at fernando-ruiz.com
Thu Apr 8 12:41:04 UTC 2004
hi,
shell.c contains examples for this.
An private env pour every session and a global session for others tasks.
BRGS.
On Wed, 7 Apr 2004 16:48:55 -0400, Alan Cudmore wrote:
>
> I want to add a variable to my task context using
> rtems_task_variable_add.
>
> The variable is a global unsigned integer:
> uint32 os_task_key;
>
> I want to set this to a unique value in each task and have the OS save
> and restore it for me.
>
> How do I pass this in to the void **ptr type in the call?
>
> calling it like this:
> rtems_status = rtems_task_variable_add ( rtems_task_id,
> &os_task_key, NULL );
> gives me a warning. Do I need to do something like the following?
>
> void *task_var_ptr;
>
> task_var_ptr = (void *)&os_task_key;
>
> rtems_status = rtems_task_variable_add(rtems_task_id, &task_var_ptr,
> NULL );
>
> Thanks,
> alan
More information about the users
mailing list