[riot-notifications] [RIOT] posix: add pthread wrapper (#219)

BytesGalore notifications at github.com
Tue Nov 26 10:34:35 CET 2013


I started to make the wrapper a bit more compatible to msba2. I found several required adjustments:
1. There is no (more) define for `_POSIX_THREAD_THREADS_MAX` so i readded it to `pthread.h`
2. the useful types have to be activated in `pthread.h`
3. free and malloc cannot be found until `oneway_malloc.h` is included and an underscore is put in front of the functios. This applies for `sched.c` and `pthread.c` (maybe i just missed something here)

anyway, the absence of `__sync_bool_compare_and_swap` still prevents to compile for msba2  
I think the implementation of http://armv6-atomic.googlecode.com/files/armv6_atomic.h is a very good way of implementation, although encapsulated in c++.  
On the basis that we need the pointers to the swapped, a pure asm implementation could be difficult as we only can access/swap registers (Im not very familiar with asm, so please correct me if this is bullshit). 
I think we should add a c function similar to the exemplary code in a separate `atomic.h` 

You can pull the current changes: git pull https://github.com/BytesGalore/RIOT.git posixThread
  

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/219#issuecomment-29278374
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20131126/bc62eb49/attachment-0001.html>


More information about the notifications mailing list