Xenomai compilation error

Hi all,

There is an error during compilation Orocos with Xenomai support for rtt-1.8.3 and rtt-1.8.4 releases. Problem is with src/os/xenomai/fosi.h file.
Below I include improved functions

static inline int rtos_mutex_lock( rt_mutex_t* m)
{
CHK_XENO_CALL();
//return rt_mutex_lock(m, TM_INFINITE );
return rt_mutex_acquire(m, TM_INFINITE );
}

static inline int rtos_mutex_trylock( rt_mutex_t* m)
{
CHK_XENO_CALL();
//return rt_mutex_lock(m, TM_NONBLOCK);
return rt_mutex_acquire(m, TM_NONBLOCK );
}

static inline int rtos_mutex_unlock( rt_mutex_t* m)
{
CHK_XENO_CALL();
//return rt_mutex_unlock(m);
return rt_mutex_release(m);
}

static inline int rtos_mutex_rec_lock( rt_rec_mutex_t* m)
{
CHK_XENO_CALL();
//return rt_mutex_lock(m, TM_INFINITE );
return rt_mutex_acquire(m, TM_INFINITE );
}

static inline int rtos_mutex_rec_unlock( rt_rec_mutex_t* m)
{
CHK_XENO_CALL();
//return rt_mutex_unlock(m);
return rt_mutex_release(m);
}

I hope it helps.

AttachmentSize
fosi.h8.82 KB

Xenomai compilation error

On Fri, Jul 17, 2009 at 14:38, <mariuszjaniak [..] ...> wrote:
> Hi all,
>
> There is an error during compilation Orocos with Xenomai support for
> rtt-1.8.3 and rtt-1.8.4 releases. Problem is with src/os/xenomai/fosi.h
> file.

Which version of Xenomai ? The *_lock() versions were indeed
deprecated for a while...

Peter

Xenomai compilation error

Hi Peter,

Currently I use Xenomai v2.4.50 (trunk build). Mutex API have been changed since v2.3.x. Newer one use rt_mutex_acquire(...) function for locking mutex and rt_mutex_release(...) function for unlocking mutex.

Mariusz