use of unix libraries

2 replies [Last post]
xquest
Title: NooBot+
Joined: 03/05/2010
Posts:
BotPoints: 8
User offline. Last seen 12 years 28 weeks ago.

I know that KISS-C is supposed to implement the "full ANSI C specification." Therefore, this may be a stupid question, but are any POSIX libraries implemented? Like, unistd.h, wait.h, etc.?

I've been mentoring Botball for a few years now and decided to buy myself a CBC. I'd like to have more powerful multitasking capabilities than those offered by start_process(), kill_process(), and defer().

Also, is hog_processor() still available in KISS-C for the CBCv2? And what's the maximum number of processes the CBC can have running?

Thanks!

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 28 weeks ago.

The CBC uses GCC, so you can use any POSIX libraries. It uses the Linux kernel, and as far as I know there is no real limit on the number of threads or processes you can have running. (As far as POSIX threads go, I'm not sure about KISS-C's custom thread system)

I would highly recommending the Nease-Norman paper.

bsilver
bsilver's picture
Title: NooBot+
Joined: 05/30/2011
Posts:
BotPoints: 9
User offline. Last seen 11 years 16 weeks ago.

KISS-C uses something called pthread. I know that system("other_binary &") works to start a completely separate process. If you felt used command line arguments, you could do limited multi process stuff by doing that with robot (the name of the binary that the run button runs). The mapping from the int that start_process returns to the pthread_t structure that I think will let you do more advanced stuff is in process.h.