taskDelay must be used?

VxWorks

    Sponsored Links

    Next

  • 1. read() and write() behaviour of pipeDevCreate
    Hi all, I am trying to write the VxWorks APIs in linux. I have few very basic doubts in the pipe device and it's behavior with read() and write(). I am creating a pipe device of 5 messages each 10 bytes. pipeDevCreate ("/pipe/name", 5, 10); say returns OK. and I open it as follows. fd = open("/pipe/name", O_RDWR, 0644); my doubts is it possible for me to issue a write() as follows 1) write(fd, buff, 9); where buff ==> char buff[10]. Since I am interested whether there would be error I use char buff instead of any other message(structure). i.e is it possible to issue a write with less than the size of a message in this case I am trying to write 9(though a message size is 10). 2) is it possible to issue write() as follows write(fd, buff, 12); where buff ==> char buff[12] ie is it possible to write more that the size of the message created. In the case of read() read(fd, rdbuff, 9); where rdbuff ==> char buff[10]. Is is possible to read more the size of the message. read(fd, rdbuff, 12); where rdbuff ==> char buff[12]. Is is possible to read more the size of the message. Thank u so much for ur help in Advance. Regards, Durai.
  • 2. inforation required /target/config/comps directory
    Hi All, Some of the functions in /target/config/all and /target/config/comps are identical. Can anybody explain why there are 2 definitions for the same function or what for those 2 directories???? Thanks in-advance, Gopal.
  • 3. [VxW] Restarting Vxworks
    Hi, I want to reboot the RAM based PowerPC VxWorks image without loading from source(Network) and without giving control to bootrom. If any one did earlier pls inform the solution. With Regards, S.Dhanapal
  • 4. drivers shipped with VxWorks
    Hi! I'm looking for advice - is there list of hardware (I mean not primary processor, but rather other on-board devices/controllers) supported with latests VxWorks releases? something like - the name of hardware (chip, vendor, id) and name of VxWorks driver... Thank you.
  • 5. dosFs problem , pls help !
    Hi all , I create two tasks in the vxworks , each task open one file for write access . When I add log message in the ataRW function , it outputs as the following : ........ Create test1 file <--- all is ok at this time ........ Create test2 file 0x7b2660 (tOne): ataRW: ctrl=4 drive=0 c=1851 h=0 s=224 buf=0x78c8e0 0x7b2660 (tOne): n=240 dir=1 0x7b2660 (tOne): ataRW: ctrl=4 drive=0 c=1 h=0 s=0 buf=0x7b2ef8 0x7b2660 (tOne): n=8 dir=1 0x7b2660 (tOne): ataRW: ctrl=4 drive=0 c=27 h=0 s=48 buf=0x7b2ef8 0x7b2660 (tOne): n=8 dir=0 0x6ac6c8 (tTwo): ataRW: ctrl=4 drive=0 c=27 h=0 s=48 buf=0x7b2ef8 0x6ac6c8 (tTwo): n=8 dir=1 <--- it looks like task2 update the task1's file information to disk , is it right ? at this time , file2 is not created at all , this message is the first log message that printed by task2 . I believe in that VxWorks can support simultaneously file access by different task , but can anyone explain it ? thanks a lot .

taskDelay must be used?

Postby defektemotor » Sun, 23 Dec 2007 04:19:18 GMT

Hi, I'm learning vxworks.
so i have so many problems. One of them is about 'taskdelay'.
if i run my program with taskdelay, all  tasks are pended or only one
task,which have highest priority, infinitely run and run.
but if i write taskDelay at the end of each task, then all programs
run.
i made the program with priority-based scheduling.
so i have tried to search any example code about using taskDelay and
all kind of semaphore usage.

Please, answer to me enough to understand or introduce to me useful
web-site.

Re: taskDelay must be used?

Postby Sadashiv » Sun, 23 Dec 2007 15:05:47 GMT



taskDelay() pends the calling task only for the specified ticks. It
does not affect other tasks.

--Sadashiv

Re: taskDelay must be used?

Postby Jeffrey Creem » Sun, 23 Dec 2007 23:15:01 GMT



Sadashiv was correct in the posting that indicated taskDelay pends the 
calling task only however it is my feeling that your question(s) above 
are really quite a bit more basic and that you need to start from the 
basics when it comes to concurrent programming.

I don't have any good websites handy that start at the level that you 
should start at.

I'd recommend a good book such as something like 
 http://www.**--****.com/ (Note, this is a link to amazon)

Principles of Concurrent and Distributed Programming (2nd Edition) 
(Prentice-Hall International Series in Computer Science) (Paperback)

I know this is a big book and pretty basic but I strongly recommend that 
you read it or something like it before diving in and writing a lot of 
code that uses tasks. Over the years I have seen a lot of code that 
attempts to use tasking without a basic understanding of the concepts 
involved and I can assure you that writing code without understand this 
will frustrate you and anyone who has to maintain your software in the 
future.

Note that this is not a vxWorks book but a basic concepts book which is 
really where one needs to start.


Return to VxWorks

 

Who is online

Users browsing this forum: No registered users and 45 guest