Project

General

Profile

Actions

Feature #1105

closed

appmgr should use semaphores for it's main loop

Added by Hammel 9 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
General
Target version:
Start date:
15 Mar 2024
Due date:
% Done:

100%

Estimated time:
Severity:
03 - Medium

Description

Use a semaphore for the main loop instead of a simple sleep loop.

Actions #1

Updated by Hammel 7 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

See queueMgr.c and queueProcessor.c in piboxd for examples.

The main loop should just wait on a semaphore created during initialization.
The sig_handler() should post the semaphore to exit the app.
After the main loop the semaphore can be destroyed.

Actions #2

Updated by Hammel 7 months ago

  • % Done changed from 10 to 70

Implemented and tested on build machine (after fixing build to allow testing on build machine).

Needs to be tested on a real Pi but I think this will work fine.

Actions #3

Updated by Hammel 7 months ago

  • % Done changed from 70 to 90

Tested on hardware and appears to be working.
Ready to be committed and pushed.

Actions #4

Updated by Hammel 7 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

Committed and pushed.

Closing issue.

Actions

Also available in: Atom PDF