Skip to content

Example code showing how to write periodic threads in Linux

Notifications You must be signed in to change notification settings

csimmonds/periodic-threads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Periodic pthreads

This repository contains some sample code showing how to create periodic threads in Linux. There is a full description of the code in my post on the Inner Penguin blog, named Over and over again: periodic tasks in Linux

Native compile

    $ make

Cross compile

Override CC with the compiler you want to use, for example:

    make CC=~/x-tools/arm-cortex_a8-linux-gnueabihf/bin/arm-cortex_a8-linux-gnueabihf-gcc

Cross compile with a Yocto Project SDK

When you install a Yocto Project SDK, you will find a script that sets up the environment for the toolchain. Among other things, it sets the CC shell variable. So, to build the samples, you would do something like this:

    $ . /opt/poky/2.0.1/environment-setup-armv5e-poky-linux-gnueabi
    $ make

About

Example code showing how to write periodic threads in Linux

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published