#include <unistd.h>
long number_of_processors = sysconf(_SC_NPROCESSORS_ONLN);
More Related Contents:
- Undefined reference to pthread_create in Linux
- Is errno thread-safe?
- Signal handling with multiple threads in Linux
- Whole one core dedicated to single process
- Is it possible to determine the thread holding a mutex?
- Pthread Run a thread right after it’s creation
- Do threads have a distinct heap?
- Linux/POSIX equivalent for Win32’s CreateEvent, SetEvent, WaitForSingleObject
- CPU cache inhibition
- Which thread handles the signal?
- WaitForSingleObject and WaitForMultipleObjects equivalent in Linux?
- How do I make this Linux program compile? [closed]
- Given an executable file, display its complete path [closed]
- Is malloc thread-safe?
- what’s the differences between r and rb in fopen
- What does malloc(0) return? [duplicate]
- What is the purpose of a zero length array in a struct? [duplicate]
- Detached vs. Joinable POSIX threads
- Can I get Unix’s pthread.h to compile in Windows?
- Convert a Static Library to a Shared Library?
- How to print time difference in accuracy of milliseconds and nanoseconds from C in Linux?
- How are user-level threads scheduled/created, and how are kernel level threads created?
- how to bind raw socket to specific interface
- Is there a way to convert from UTF8 to ISO-8859-1?
- Creating your own syntax highlighting in GEdit?
- How to make a linux shared object (library) runnable on its own?
- /proc/[pid]/pagemaps and /proc/[pid]/maps | linux
- getrandom syscall in C not found
- Sharing same variable between more than one independent programs in Linux [closed]
- argv: Sanitizing wildcards