##############Counting semaphores.#######################
Then I start to use FreeRTOS. I thougth that the first and simplest thing that
OS must have is an semaphore. And I was supprused about semaphores in
FreeRTOS. Actualy there is no semaphore there is only a macroses.
Also I saw that many people asked about counting semaphores. And so
I decided to look how it works and why there is only queue in OS and how
semaphores can be written.
And finaly I tryed to write semaphore code for the FreeRTOS kernel.
Here is my semaphore
code for the FreeRTOS kernel.
I hope Richard Barry will take this code to his OS kernel.
Anyway I will use It in my applications.
And that's why I asked Richard and other people who whant to have another implementation to test this code.
I used OpenWatcom1.7a compiler and WindowsXP for testing
semtest.c is working fine.
All you need is to put this file it in your freertos directory and replace haders.
Just repalece
#include "semphr.h"
on
#include "semphore.h"
Also I will be glad if you test my suggestions on memory
at help
Changes before 30.11.07
Some bugs have fixed
Changes at 30.11.07
Adding some discriptions to semaphore.h