Question

Very much a beginner at programming/software. I am trying to port some code written for linux onto my vxworks project.

When including pthread.h, it appears to be including the header from C:\WindRiver\vxworks-6.8\target\h however I noticed there is another header located in C:\WindRiver\vxworks-6.8\target\usr\h that is a bit different.

One example of the differences is the function pthread_mutexattr_settype does not exist in one of them. According to v6.8 documentation, pthread_mutexattr_settype is a function i should have access to.

Perhaps I set up my paths wrong? Do I need to do something special for my project to know where to look? When I update my build path to the usr folders... When i right click and open declaration, it gives me 2 options to chose from (both locations). And yes I only have 1 location in my build path.

Was it helpful?

Solution

Reading the documentation is always a good 1st step.

VxWorks is POSIX PSE5.2 conformant only when using Real-Time Process (RTP) projects. That is what the /usr/... header points to.

If you are building a kernel module (DKM), then some of the POSIX interface are available, but apparently not the one you want for your port.

So, use RTPs is you want to port your code.

See the VxWorks Application Programmer's Guide. Section 3.4.2 (VxWorks 6.9) clearly states that target/usr/h is where the system header files are for RTPs. And cautions you not to reference header files in target/h.

See section 9 about POSIX Support.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top