Giter Site home page Giter Site logo

smeetsomaiya / linux-posix-multithreading Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 1.25 MB

Real-time Task Models in Linux POSIX (pthreads) with demonstration usage of Mutex and semaphores to control the thread execution order and check for priority inversion.

Makefile 3.46% C 96.54%

linux-posix-multithreading's Introduction

Steps to install and run -

Note: You may need to edit some compile paths and/or the galileo ssh IP depending on your configuration. The Makefile is highly configurable, and you only need to change the values of certain variables.

1.To compile the hcsr driver and userspace program

Cross compile for galileo - make galileo

2. Copy over to galileo using - make scp

3. Run on galileo
a. Install the module -
	chmod +x ./ins_p2
	./ins_p2 <num_devices>
For example: ./ins_p2 2

b. Run the script for sysfs
	chmod +x ./run_p2
	./run_p2 <num_devices>
For example: ./run_p2 2

c. Run the userspace program
	./hcsr_tester 1 0 1 3 5000

The format is: {./hcsr_tester num_devices io_trig_pin io_echo_pin num_samples sampling_period}

Another example: For 2 devices -
	./hcsr_tester 2 0 1 3 5000 19 6 3 5000

linux-posix-multithreading's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.