All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] binding without root access..
@ 2006-07-11 16:05 Kim Chuan Lim
  2006-07-11 17:05 ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Kim Chuan Lim @ 2006-07-11 16:05 UTC (permalink / raw)
  To: xenomai

Hi all,

Xenomai: binding failed: Operation not permitted.

Is it possible for me to do the binding without switching to root?

Regards,
Kim Chuan.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] binding without root access..
  2006-07-11 16:05 [Xenomai-help] binding without root access Kim Chuan Lim
@ 2006-07-11 17:05 ` Jan Kiszka
  2006-07-11 17:35   ` Kim Chuan Lim
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2006-07-11 17:05 UTC (permalink / raw)
  To: Kim Chuan Lim; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

Kim Chuan Lim wrote:
> Hi all,
> 
> Xenomai: binding failed: Operation not permitted.
> 
> Is it possible for me to do the binding without switching to root?

Switch off XENO_OPT_SECURITY_ACCESS, but you will likely run on other
barriers later (like the number of mlock'able pages, essential for RT).
What is your motivation to run RT apps as non-root?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] binding without root access..
  2006-07-11 17:05 ` Jan Kiszka
@ 2006-07-11 17:35   ` Kim Chuan Lim
  2006-07-11 17:50     ` Jan Kiszka
  0 siblings, 1 reply; 5+ messages in thread
From: Kim Chuan Lim @ 2006-07-11 17:35 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai

Hi Jan,

I try to run some old example from http://www.captain.at/xenomai.php
I am getting feddup with some examples which keep on hanging my system.
I thought maybe if i run the old examples with normal user mode, i
will not crash the system.

Between, the examples program in testsuits are too much complicated
for beginner like me.
Is there any up to date and easy understandable examples?

Regards,
Kim Chuan



On 7/11/06, Jan Kiszka <jan.kiszka@domain.hid> wrote:
> Kim Chuan Lim wrote:
> > Hi all,
> >
> > Xenomai: binding failed: Operation not permitted.
> >
> > Is it possible for me to do the binding without switching to root?
>
> Switch off XENO_OPT_SECURITY_ACCESS, but you will likely run on other
> barriers later (like the number of mlock'able pages, essential for RT).
> What is your motivation to run RT apps as non-root?
>
> Jan
>
>
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] binding without root access..
  2006-07-11 17:35   ` Kim Chuan Lim
@ 2006-07-11 17:50     ` Jan Kiszka
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2006-07-11 17:50 UTC (permalink / raw)
  To: Kim Chuan Lim; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]

Kim Chuan Lim wrote:
> Hi Jan,
> 
> I try to run some old example from http://www.captain.at/xenomai.php
> I am getting feddup with some examples which keep on hanging my system.
> I thought maybe if i run the old examples with normal user mode, i
> will not crash the system.

Every program with RT power can hang your system: in an endless loop
with raise priority. That's why it's not that simple to allow non-root
RT access.

> 
> Between, the examples program in testsuits are too much complicated
> for beginner like me.
> Is there any up to date and easy understandable examples?

What about ksrc/skins/native/snippets/? They may not run but they can
give some ideas. Here is one of the simplest that does run (my classic
version):

#include <signal.h>
#include <sys/mman.h>
#include <native/task.h>

void demo(void *arg)
{
    rt_task_set_periodic(NULL, TM_NOW, 200000);
    while (1) {
        rt_task_wait_period(NULL);
        /* real-time jobs */
    }
}

void catch_signal(int sig) { }

int main(int argc, char* argv[])
{
    RT_TASK demo_task;

    signal(SIGINT, catch_signal);
    mlockall(MCL_CURRENT|MCL_FUTURE);
    rt_task_create(&demo_task, "mydemo", 0, 99, 0);
    rt_task_start(&demo_task, &demo, NULL);
    pause();
    rt_task_delete(&demo_task);
    return 0;
}

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xenomai-help] binding without root access..
@ 2006-07-11 18:05 Hannes Mayer
  0 siblings, 0 replies; 5+ messages in thread
From: Hannes Mayer @ 2006-07-11 18:05 UTC (permalink / raw)
  To: xenomai


Kim Chuan Lim wrote:
> Hi Jan,
> 
> I try to run some old example from http://www.captain.at/xenomai.php

An old fusion example ?
Make sure you read:
http://www.captain.at/xenomai-porting-fusion.php
As you can see, porting (simple) examples from fusion to xeno is pretty
straightforward.

Best regards,
Hannes.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-11 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 16:05 [Xenomai-help] binding without root access Kim Chuan Lim
2006-07-11 17:05 ` Jan Kiszka
2006-07-11 17:35   ` Kim Chuan Lim
2006-07-11 17:50     ` Jan Kiszka
  -- strict thread matches above, loose matches on Subject: below --
2006-07-11 18:05 Hannes Mayer

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.