# To subscribers of the xforms list from Antonio Buitrago <email@example.com> :
I have solved a similar problem using this (Chapter 4 in XForms Manual):
1.- Connect a function to "fd" :
static int fd;
int inicRefrescoForms ()
2.- The callback function waits for a message from "fd":
The structure "msj" (in below function) is a message which contain the "what
to do" information.
void refresca_forms_io_callback (int fd, void * dato)
if ((nBytes = read(fd, &msj, sizeof(msj))) > 0)
void refresca_ppal(TD_msj_refresco *msj)
fl_set_object_label (fd_ppal->text_fecha, (char *)msj->args);
3.- Now you can send a "msj" from a thread to Xforms.
I hope it helps you (Sorry my bad english).
Paolo Prandini wrote:
> I implemented a big program using XForms whose purpose is to control some
> industrial machinery; the same Linux PC running X is also controlling the
> (motors, lights, etc).
> I need to show some real time values and alarms in the same window where
> are located the pushbuttons activating the various functions .
> I didn't even think of it, but in fact I designed everything as if
> XForms were threadsafe.
> BUT IT IS NOT! Now I have some mysterious lockups and I traced them to
> this kind of problem.
> The possible solutions are:
> a) rewrite everything with another lib that is threadsafe
> b) fix XForms
> But to fix XForms I need the source code! What about letting me do this
> kind of modification? Or maybe there is a threadsafe version in the works?
> Thanks for any suggestion.
> Paolo Prandini
To unsubscribe, send the message "unsubscribe" to
firstname.lastname@example.org or see
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Thu Jun 01 2000 - 07:31:27 EDT