All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Re: [Xenomai-core] VxWorks skin improvement
@ 2006-03-17 15:13 Alessandro Pittaluga
  2006-03-17 15:40 ` Philippe Gerum
  0 siblings, 1 reply; 5+ messages in thread
From: Alessandro Pittaluga @ 2006-03-17 15:13 UTC (permalink / raw)
  To: rpm; +Cc: xenomai, xenomai

Philippe, 
Here follow some tests carried on by my SW lab.
Hoping this may help.

Regards

Alessandro

ANSWER 1
As shown below calling taskName with a null argument will return the
same result returned by taskName called with the return value of
taskIdSelf().
	OUTPUT:
	Spawned task xeno_test taskId=0x01a59a48
	    This is task_entry_pnt() of task 0x01a59a48
        	taskName(0)=xeno_test  taskName(taskIdSelf())=xeno_test
        	taskName(0x01a59a48)=xeno_test


ANSWER 2
MSG_PRI_NORMAL is defined 0 and MSG_PRI_URGENT is defined 1. It seems
that all non 0 priority
messages are managed as urgent. The first message extracted from the
queue by a receiver is
the last inserted into the queue with a non 0 priority.
The following 7 cases show the calling sequence of a sending task and
the received message
lengths of a receiving task.

CASE 1
	[Sending task]: [msgQSend(qid,"a"         , 1, NO_WAIT, MSG_PRI_NORMAL)] returned OK
	[Sending task]: [msgQSend(qid,"ab"        , 2, NO_WAIT, MSG_PRI_URGENT)] returned OK
	[Sending task]: [msgQSend(qid,"abc"       , 3, NO_WAIT, 2)] returned OK
	[Sending task]: [msgQSend(qid,"abcd"      , 4, NO_WAIT, 3)] returned OK
	[Sending task]: [msgQSend(qid,"abcde"     , 5, NO_WAIT, 4)] returned OK
	[Sending task]: [msgQSend(qid,"abcdef"    , 6, NO_WAIT, 5)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefg"   , 7, NO_WAIT, 6)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefgh"  , 8, NO_WAIT, 7)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefghi" , 9, NO_WAIT, 8)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefghij",10, NO_WAIT, 9)] returned OK

	[Receiving task]: Received 10 bytes from queue
	[Receiving task]: Received  9 bytes from queue
	[Receiving task]: Received  8 bytes from queue
	[Receiving task]: Received  7 bytes from queue
	[Receiving task]: Received  6 bytes from queue
	[Receiving task]: Received  5 bytes from queue
	[Receiving task]: Received  4 bytes from queue
	[Receiving task]: Received  3 bytes from queue
	[Receiving task]: Received  2 bytes from queue
	[Receiving task]: Received  1 bytes from queue

CASE 2
	[Sending task]: [msgQSend(qid,"abcdefghij",10, NO_WAIT, 9)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefghi" , 9, NO_WAIT, 8)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefgh"  , 8, NO_WAIT, 7)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefg"   , 7, NO_WAIT, 6)] returned OK
	[Sending task]: [msgQSend(qid,"abcdef"    , 6, NO_WAIT, 5)] returned OK
	[Sending task]: [msgQSend(qid,"abcde"     , 5, NO_WAIT, 4)] returned OK
	[Sending task]: [msgQSend(qid,"abcd"      , 4, NO_WAIT, 3)] returned OK
	[Sending task]: [msgQSend(qid,"abc"       , 3, NO_WAIT, 2)] returned OK
	[Sending task]: [msgQSend(qid,"ab"        , 2, NO_WAIT, MSG_PRI_URGENT)] returned OK
	[Sending task]: [msgQSend(qid,"a"         , 1, NO_WAIT, MSG_PRI_NORMAL)] returned OK

	[Receiving task]: Received  2 bytes from queue
	[Receiving task]: Received  3 bytes from queue
	[Receiving task]: Received  4 bytes from queue
	[Receiving task]: Received  5 bytes from queue
	[Receiving task]: Received  6 bytes from queue
	[Receiving task]: Received  7 bytes from queue
	[Receiving task]: Received  8 bytes from queue
	[Receiving task]: Received  9 bytes from queue
	[Receiving task]: Received 10 bytes from queue
	[Receiving task]: Received  1 bytes from queue

CASE 3
	[Sending task]: [msgQSend(qid,"abcdef"    ,6, NO_WAIT, 5)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefgh"  ,8, NO_WAIT, 7)] returned OK

	[Receiving task]: Received  8 bytes from queue
	[Receiving task]: Received  6 bytes from queue

CASE 4
	[Sending task]: [msgQSend(qid,"abcdefgh"  ,8, NO_WAIT, 7)] returned OK
	[Sending task]: [msgQSend(qid,"abcdef"    ,6, NO_WAIT, 5)] returned OK

	[Receiving task]: Received  6 bytes from queue
	[Receiving task]: Received  8 bytes from queue

CASE 5
	[Sending task]: [msgQSend(qid,"abcdef"    ,6, NO_WAIT, 5)] returned OK
	[Sending task]: [msgQSend(qid,"a"         ,1, NO_WAIT, MSG_PRI_NORMAL)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefgh"  ,8, NO_WAIT, 7)] returned OK

	[Receiving task]: Received  8 bytes from queue
	[Receiving task]: Received  6 bytes from queue
	[Receiving task]: Received  1 bytes from queue

CASE 6
	[Sending task]: [msgQSend(qid,"abcdef"    ,6, NO_WAIT, 5)] returned OK
	[Sending task]: [msgQSend(qid,"a"         ,1, NO_WAIT, MSG_PRI_NORMAL)] returned OK
	[Sending task]: [msgQSend(qid,"ab"        ,2, NO_WAIT,-1)] returned OK

	[Receiving task]: Received  2 bytes from queue
	[Receiving task]: Received  6 bytes from queue
	[Receiving task]: Received  1 bytes from queue

CASE 7
	[Sending task]: [msgQSend(qid,"abcdef"    ,6, NO_WAIT, 5)] returned OK
	[Sending task]: [msgQSend(qid,"a"         ,1, NO_WAIT, MSG_PRI_NORMAL)] returned OK
	[Sending task]: [msgQSend(qid,"abcdefgh"  ,8, NO_WAIT, MSG_PRI_NORMAL)] returned OK
	
	[Receiving task]: Received  6 bytes from queue
	[Receiving task]: Received  1 bytes from queue
	[Receiving task]: Received  8 bytes from queue

ANSWER 3
Calling taskInit() with invalid flags won't return any error code.

SPAWN:  taskInit(&tcb, "xeno_test3", 113, 0xffffffff,
stack+TASK_STACK_SIZE, 
		 TASK_STACK_SIZE, (FUNCPTR)task_entry_pnt, 0,0,0,0,0,0,0,0,0,0)
INFO:   taskInfoGet((int)&tcb, &td)  ---> td.td_options = 0xffffffff

The ti funcion returns the following outoput
-> ti "xeno_test3"

  NAME        ENTRY       TID    PRI   STATUS      PC       SP     ERRNO
   DELAY
---------- ------------ -------- --- ---------- -------- --------
------- -----
xeno_test3 task_entry_p  1b66090 113 SUSPEND      1969f8  1b6a250      
0     0

stack: base 0x1b6a290  end 0x1b66290  size 16104  high   ???  margin  
???

options: 0xffffffff
VX_SUPERVISOR_MODE  VX_UNBREAKABLE      VX_DEALLOC_STACK    VX_FP_TASK  
       VX_STDIO            VX_ADA_DEBUG        VX_FORTRAN         
VX_PRIVATE_ENV     VX_NO_STACK_FILL



-- 
  Alessandro Pittaluga
  al.pittaluga@domain.hid

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html



^ permalink raw reply	[flat|nested] 5+ messages in thread
* [Xenomai-core] VxWorks skin improvement
@ 2006-03-16 13:53 Philippe Gerum
  2006-03-17 12:04 ` Niklaus Giger
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2006-03-16 13:53 UTC (permalink / raw)
  To: xenomai, xenomai


I'm currently working on extending the VxWorks skin so that it is going to be 
callable from user-space directly, without needing the UVM environment. This will 
also make its functional extension easier in the future, especially with respect 
to bsp-related services.

While I'm at it, I'd also like to polish a few corner cases, so that we have the 
closest possible emulation of the original RTOS services. Unfortunately, the 
VxWorks documentation is rather terse on some behavioural aspects, and I have no 
VxWorks target at hand to test and check them. Therefore, I definitely need help 
from people reading this list who also happen to be VxWorks users, for providing 
the following missing bits of information:

- How does taskName() behave when passed a null task id? Is it equivalent to 
specifying taskIdSelf(), or does it lead to a NULL error return?

- How does msgQSend() behave when passed an invalid message priority, i.e. neither 
MSG_PRI_NORMAL nor MSG_PRI_URGENT?

- How does taskInit() behave when passed an invalid set of task options? Are the 
invalid flags ignored, or does the routine return an error status?

If you happen to have a VxWorks target at hand regardless of the architecture, and 
are willing to help improving the behavioural correctness of the VxWorks skin, 
then your input will be most welcome.

-- 

Philippe.


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

end of thread, other threads:[~2006-03-17 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-17 15:13 [Xenomai-help] Re: [Xenomai-core] VxWorks skin improvement Alessandro Pittaluga
2006-03-17 15:40 ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2006-03-16 13:53 Philippe Gerum
2006-03-17 12:04 ` Niklaus Giger
2006-03-17 14:45   ` Philippe Gerum

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.