* [ECOS] How do I manually clear wakeup_event.chan?
@ 2000-10-27 17:27 AshCan
0 siblings, 0 replies; 3+ messages in thread
From: AshCan @ 2000-10-27 17:27 UTC (permalink / raw)
To: ecos-discuss
In testing my software, I am trying to gracefully
shutdown and close the socket and then delete the
thread.
This works until the number of thread deletions exceeds
my CYG_NET_NUM_WAKEUP_EVENTS = 8 and I get ETIMEDOUT upon connect. I look
into the wakeup_list[] structure
array and sure enough, it is fully occupied.
Is there an easy function call I can make to clear the
socket's wakeup_event structre entry before I terminate
the thread?
I am using v1.3.1, ARM EDB7212 target.
regards,
Dan Ash
SonicBox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] How do I manually clear wakeup_event.chan?
@ 2000-10-30 15:19 AshCan
0 siblings, 0 replies; 3+ messages in thread
From: AshCan @ 2000-10-30 15:19 UTC (permalink / raw)
To: ecos-discuss
I found a solution to my v1.3.1 cyg_tsleep problem
where wakeups were not timing out resulting
in connect failing. By pasting a line to clear the
wakeup strcutre array's semaphore. I found this in
the CVS build cyg_tsleep function in file synch.c.
my v1.3.1 fix:
File: tcpip/v1_0b1/src/ecos/support.c
Starting at line:
cyg_scheduler_unlock();
Add this line of code:
cyg_semaphore_init(&ev->sem,0);
Continuing with exisiting code:
if (timo) {
sleep_time = cyg_current_time() + timo;
if (!cyg_semaphore_timed_wait(&ev->sem, sleep_time)) {
res = ETIMEDOUT;
ev->chan = 0; // Free slot
}
} else {
cyg_semaphore_wait(&ev->sem);
}
return res;
In a message dated Sun, 29 Oct 2000 1:01:09 AM Eastern Standard Time,
AshCan@aol.com writes:
<< Just a few more important details.
> In a message dated 10/27/00 5:28:19 PM Pacific
> Daylight Time, AshCan@aol.com
> writes:
> > In testing my software, I am trying to gracefully
> > shutdown and close the socket and then delete the
> > thread.
> >
> The thread simply upon command, opens sockets, connects to a server, and
> reads streamed audio data. When I delete the thread, the thread could be
> anywhere
> in its processing, not necessarily in the middle of a recv.
> > This works until the number of thread deletions exceeds
> > my CYG_NET_NUM_WAKEUP_EVENTS = 8 and I get ETIMEDOUT upon
> > connect. I look into the wakeup_list[] structure
> > array and sure enough, it is fully occupied.
> This problem does not occur when I do not delete my network thread and only
> shutdown and close sockets.
> >
> > Is there an easy function call I can make to clear the
> > socket's wakeup_event structre entry before I terminate
> > the thread?
> >
> > I am using v1.3.1, ARM EDB7212 target.
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] How do I manually clear wakeup_event.chan?
@ 2000-10-28 23:00 AshCan
0 siblings, 0 replies; 3+ messages in thread
From: AshCan @ 2000-10-28 23:00 UTC (permalink / raw)
To: ecos-discuss
Just a few more important details.
In a message dated 10/27/00 5:28:19 PM Pacific Daylight Time, AshCan@aol.com
writes:
> In testing my software, I am trying to gracefully
> shutdown and close the socket and then delete the
> thread.
>
The thread simply upon command, opens sockets, connects to a server, and
reads streamed audio data. When I delete the thread, the thread could be
anywhere
in its processing, not necessarily in the middle of a recv.
> This works until the number of thread deletions exceeds
> my CYG_NET_NUM_WAKEUP_EVENTS = 8 and I get ETIMEDOUT upon
> connect. I look into the wakeup_list[] structure
> array and sure enough, it is fully occupied.
This problem does not occur when I do not delete my network thread and only
shutdown and close sockets.
>
> Is there an easy function call I can make to clear the
> socket's wakeup_event structre entry before I terminate
> the thread?
>
> I am using v1.3.1, ARM EDB7212 target.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-10-30 15:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-27 17:27 [ECOS] How do I manually clear wakeup_event.chan? AshCan
2000-10-28 23:00 AshCan
2000-10-30 15:19 AshCan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).