![]() |
Re: Utilizing Both RoboRIO Cores
Quote:
https://github.com/Talos4757/wpilib/blob/master/Task.h https://github.com/Talos4757/wpilib/...aster/Task.cpp It uses the VxWorks TaskLib (which is probably POSIX compatible). I think that thhis year they use POSIX threads since the RoboRIO runs Linux (with RT extensions). |
Re: Utilizing Both RoboRIO Cores
The vxWorks taskLib is the native interface for creating and manipulating new tasks - it is not POSIX. But VxWorks has a POSIX compatible library if it was included - I do not remember if it was or not.
The POSIX call to create a new thread is pthread_create and you can associate the thread with a particular core using sched_setaffinity (after the thread is running) or with pthread_setaffinity_np (to setup thread attributes before the thread is started). Whether you should or not depends on the toplogy of your application. Remember that switching from one thread to another running on a different core can be as time consuming as switching between threads that are part of different processes. |
| All times are GMT -5. The time now is 22:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi