You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pthread.c: In function 'void* worker_thread(void*)':
pthread.c:8:18: error: 'pthread_exit' was not declared in this scope
pthread_exit(NULL);
^
pthread.c: In function 'int main()':
pthread.c:15:1: error: 'pthread_t' was not declared in this scope
pthread_t my_thread;
^
pthread.c:15:11: error: expected ';' before 'my_thread'
pthread_t my_thread;
^
pthread.c:18:23: error: 'my_thread' was not declared in this scope
ret = pthread_create(&my_thread, NULL, &worker_thread, NULL);
^
pthread.c:18:60: error: 'pthread_create' was not declared in this scope
ret = pthread_create(&my_thread, NULL, &worker_thread, NULL);
^
pthread.c:24:21: error: 'pthread_exit' was not declared in this scope
} pthread_exit(NULL);
The text was updated successfully, but these errors were encountered:
Hey @amikhail48, I think the phtread libraries are not available for embedded implementations of libc. You might need to link a platform specific implementation for this to work, similar to the dynamic memory allocation options.
Example program:
Compilation error:
The text was updated successfully, but these errors were encountered: