Vladimir Tzankov wrote:
> On 9/22/10, Sam Steingold <sds@...> wrote:
>> Vladimir Tzankov wrote:
>>> ...calls lisp code while the state of
>>> the thread is marked to be in blocking system call. Are there other
>>> such cases?
>> there are 2(?) callbacks in new-clx and no calls marked as blocking.
>> I think modules/clx/new-clx/clx.f needs to be reviewed...
> I do not have experience with X.
> I see in these 2 callbacks there is pattern:
> ... /* do some stuff */
> Is it possible X call (after begin_x_call()) to block?
I think that the X client-server architecture where the X server runs on one
machine (your desktop) and the client can run elsewhere (e.g., I am at work and
I can start emacs on my home machine which will display the Emacs X window on
the desktop in front of me) means that just about any X call may block due to a
> If so - we may change:
> #define begin_x_call() START_WRITING_TO_SUBPROCESS;begin_call()
> #define end_x_call() end_call();STOP_WRITING_TO_SUBPROCESS
> #define begin_x_call() \
> #define end_x_call() \
> and add (and use in callbacks):
> #define begin_x_callback() end_blocking_system_call(); begin_callback()
> #define end_x_callback() end_callback(); begin_blocking_system_call();
probably. Bruno, do you concur?
> On a side note - I feel (esp. when have not looked for some time in
> the source) confused by plenty of macros like:
> 1. begin/end_call()
> 2. begin/end_system_call(): nop or eq to begin/end_call()
> 3. begin/end_blocking_call()
> 4. begin/end_block_system_call(): same as begin/end_blocking_call() +
> 5. begin/end_callback()
> 6. begin/end_rl_callback(): same as begin/end_callback() +
> 7. begin/end_arith_call(), begin/end_setjmp_call(), begin/end_longjpm
> I do not want to add more like this and seems we can get rid of some of them.
I am also constantly confused by this mess. However, the docs seem to be
reasonably clear that all of them are really needed...
Maybe some unification could be attempted, e.g., begin/end_rl_callback() should
be renamed begin/end_callback_blocking() and used in, e.g., syscalls and new-clx.