From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Niklaus Giger" Date: Fri, 15 Sep 2006 21:44:48 +0200 Message-ID: Sender: news Subject: [Xenomai-core] Odd behaviour of vxworks Reply-To: Niklaus.Giger@domain.hid List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Cc: 0@domain.hid Hi First I was surprised that a lot of vxworks return -1 unless running inside a thread created by taskSpawn, e.g. taskIdSelf or taskMCreate return -1. Then I did added a very simple sequence of semMCreate semTake semGive and now semGive returned me -1 (ERROR). This puzzled me even more, as this is the same sequence where the simulator has no problem and where semGive returns 0 (OK). I modified satch.c (see patch below) to get a simple test case (in UVM). Native and UVM are built-in. Output is: _user_init: semMCreate 4 taskId -1 __xeno_user_init: semTake 4 status -1 -1 taskId -1 __xeno_user_init: semGive 4 status -1 -1 taskId -1 consumer_task: task 6 ConsumerTask producer_task: task SEM_DELETE_SAFE 7 ProducerTask producer_task: semMCreate 8 taskId 7 producer_task: semTake 8 status 0 0 taskId 7 producer_task: semGive 8 status -1 1441896 taskId 7 producer_task: semDelete 8 status 0 1441896 taskId 7 producer_task: task 7 ProducerTask producer_task: semMCreate 9 taskId 7 producer_task: semTake 9 status 0 1441896 taskId 7 producer_task: semGive 9 status -1 1441896 taskId 7 Now playing Surfing With The Alien... Now playing Lords of Karma... Now playing Banana Mango... I am reproduced these results with Xenomai trunk revision 1618. Using a simulator (built with an earlier version) outputs like this: Xenomai/sim: real-time nucleus v2.2-rc1 (Engines Of Creation) loaded. starting VxWorks services. __xeno_user_init: semMCreate 269073416 taskId 268720448 __xeno_user_init: semTake 269073416 status 0 0 taskId 268720448 __xeno_user_init: semGive 269073416 status 0 0 taskId 268720448 consumer_task: task 269074952 ConsumerTask producer_task: task SEM_DELETE_SAFE 269075976 ProducerTask producer_task: semMCreate 269073544 taskId 269075976 producer_task: semTake 269073544 status 0 0 taskId 269075976 producer_task: semGive 269073544 status 0 0 taskId 269075976 producer_task: semDelete 269073544 status 0 0 taskId 269075976 producer_task: task 269075976 ProducerTask producer_task: semMCreate 269073544 taskId 269075976 producer_task: semTake 269073544 status 0 0 taskId 269075976 producer_task: semGive 269073544 status 0 0 taskId 269075976 Any hint would be appreciated. Best regards Niklaus Giger begin 666 satch.patch M26YD97@domain.hid=&-H+F,*/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T] M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/0HM+2T@"D*(`H@(V1E9FEN92!X;G!R:6YT9B!PPH@"71A2A#3TY354U%4E]704E4 M*3L*0$`@+3$P-2PW("LQ,#