Moderator: cpp4robots_admin

Nam Hoang


Post by Nam Hoang »

Currently I want to use some functions in the Thread section of Ev3 developed by you but because I use windows VS 2015 without <unistd.h> and <pthread.h> but <pthread.h> can only be installed VS's Nuget has <unistd.h>, I can't see how to safely install it.
Help me how to use EV3 thread.

Untitled.png (2.57 KiB) Viewed 1254 times
Administrátor fóra
Posts: 21
Joined: 04 Nov 2020 14:34

Re: Thread

Post by cpp4robots_admin »

Hello Nam,

You can use the header file "EV3_Thread.h".

Code: Select all

#include <EV3_Thread.h>
There are functions as CreateThread, EV3_Sleep or synchronization functions CREATE_MUTEX, CREATE_EVENT,...etc.

You can also use directly Linux functions from header file pthread.h.

Code: Select all

#include <pthread.h>
Such as function pthread_create.

Last bumped by Anonymous on 10 Mar 2021 01:08.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest