The application consists of two tasks running on a two separate cores. There is also a C library, which has some shared data defined and some functions which operate on those structures. Both tasks call those functions in a loop. The C library was designed thread-wise, so it implements some dummy functions for mutex locking/unlocking (so the shared resources are never written simultaneously by both tasks). So we are writing a wrapper for XC software locks using lib_locks 2.0.0.
The whole implementation of a wrapper is quite trivial, however, it seems that the tasks cannot release the locks, and the whole application freezes when both tasks are waiting in an loop of swlock_acquire(). When tried to implement a hardware lock, the SIGBUS signal is being received at the moment of releasing a lock.
The question is: what is wrong? Are there any examples of an application with two tasks and locks?
Software locks issue
-
- Junior Member
- Posts: 4
- Joined: Thu May 28, 2015 1:15 pm
Software locks issue
You do not have the required permissions to view the files attached to this post.
-
- XCore Addict
- Posts: 158
- Joined: Thu Mar 20, 2014 8:04 am
An example program @
https://github.com/xcore/sc_util/tree/m ... ks_example
Using lib_locks should not ve a major impact to use with the above example.
https://github.com/xcore/sc_util/tree/m ... ks_example
Using lib_locks should not ve a major impact to use with the above example.