Skip to content

Instantly share code, notes, and snippets.

@pvrego
Last active April 17, 2021 02:57
Show Gist options
  • Save pvrego/7fd2610d0bf5ca063e63db6ab776e89c to your computer and use it in GitHub Desktop.
Save pvrego/7fd2610d0bf5ca063e63db6ab776e89c to your computer and use it in GitHub Desktop.
Working with PThreads in Raspberry Pi

PThreads installation

In order to install, in Raspbian terminal you may execute

sudo apt-get install libpthread-stubs0-dev

So the system will return

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libbabeltrace-ctf1 libbabeltrace1 libc6-dbg libdw1 libpython3.5
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  libpthread-stubs0-dev
0 upgraded, 1 newly installed, 0 to remove and 114 not upgraded.
Need to get 4,042 B of archives.
After this operation, 4,096 B of additional disk space will be used.
Get:1 http://mirror.nbtelecom.com.br/raspberryPI/raspbian stretch/main armhf libpthread-stubs0-dev armhf 0.3-4 [4,042 B]
Fetched 4,042 B in 1s (2,674 B/s)
Selecting previously unselected package libpthread-stubs0-dev:armhf.
(Reading database ... 47839 files and directories currently installed.)
Preparing to unpack .../libpthread-stubs0-dev_0.3-4_armhf.deb ...
Unpacking libpthread-stubs0-dev:armhf (0.3-4) ...
Setting up libpthread-stubs0-dev:armhf (0.3-4) ...

Now that the library is installed, you can already go into pthreads.

To take a look (me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment