This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Semaphore
- From: "Chris C." <hksbtx at 2bzd dot com>
- To: ecos-discuss at sourceware dot cygnus dot com
- Date: Wed, 14 Nov 2001 12:13:30 +0800
- Subject: [ECOS] Semaphore
Hi!
Code:
extern cyg_sem_t g_semInit;
In cyg_user_start(),
{
thread_init();
cyg_scheduler_start();
cyg_semaphore_wait(&g_semInit);
printf("wake up\n");
}
In about function, I called the thread_init to create a thread, init
semaphore and resume it, this thread will call some functions and then call
cyg_semaphore_post(&g_semInit). I found that the printf did not print the
wake up message.
Is there something wrong?
Thanks!
----------------------------------------------------
Chris
_________________________________________________________________________
Sure, you can have free email. But free Email, Voicemail and Faxmail?
Check it out at http://www.2bzd.com