Hi Rodrigo,
> I don't think we are using any extra port on TS but the regular ones
> includes in the basic board.
Ok, I would imagine that those ports should use standard
serial drivers. However, your best-bet is to confirm
that using your x86 desktop or laptop.
> One of our developer report that the close(fd) on that serial
> port file descriptor does not unblock the read().
> I will double check but I'm pretty sure they try that.
Thats entirely possible.
> The use of the select function seems to be a partial solution that could
> work for us but I was wondering why this fails.
>
> I wrote before a layer that works for other platforms like Win32 and then I
> use another function to unblock the thread.
> Then we migrate the layer to Linux only to found that stopping the thread is
> really complicated.
>
> Somebody in this group reply about sending a signal using pthread_kill?
>
> Will this unblock the 'read' statement for the target thread?
> I assume read will return an amount read of -1 or 0.
> If that is the case we could immediately detect that the driver needs to be
> closed and gracefully exit the thread.
Again, I would think it should, but writing code is the
ultimate confirmation.
If you have to deal with lots of threads, then adding signals
can make things complicated. Using multiple file descriptors
with select() will generally result in safer code.
Cheers,
Dave
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|