Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.808 2002/10/14 11:50:07 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.809 2002/10/23 19:17:03 mast Exp $";      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN   #include <roxen.h>   #include <config.h>   #include <module.h>   #include <variables.h>
Roxen.git/server/base_server/roxen.pike:516: Inside #if defined(THREADS)
   array buffer=allocate(8);    int r_ptr, w_ptr;       int size()    {    return w_ptr - r_ptr;    }       mixed read()    { -  while(!(w_ptr - r_ptr)) r_cond::wait(); +  while(!(w_ptr - r_ptr)) +  // Make a MutexKey for wait() to please 7.3. This will of course +  // not fix the race, but we ignore that. See the discussion +  // above. +  r_cond::wait (Thread.Mutex()->lock());    mixed tmp = buffer[r_ptr];    buffer[r_ptr++] = 0; // Throw away any references.    return tmp;    }       mixed tryread()    {    if (!(w_ptr - r_ptr)) return ([])[0];    mixed tmp = buffer[r_ptr];    buffer[r_ptr++] = 0; // Throw away any references.
Roxen.git/server/base_server/roxen.pike:613: Inside #if defined(THREADS)
   return;    }   #ifdef DEBUG    else if (h != 1)    error ("Unknown message in handle_queue: %O\n", h);   #endif    else {    num_hold_messages--;    THREAD_WERR("Handle thread [" + id + "] put on hold");    threads_on_hold++; -  if (Thread.Condition cond = hold_wakeup_cond) cond->wait(); +  if (Thread.Condition cond = hold_wakeup_cond) +  // Make a MutexKey for wait() to please 7.3. This will of +  // course not fix the race, but we ignore that. See the +  // comment at the declaration of hold_wakeup_cond. +  cond->wait (Thread.Mutex()->lock());    threads_on_hold--;    THREAD_WERR("Handle thread [" + id + "] released");    }    } while(1);    }) {    if (h = catch {    report_error(/*LOCALE("", "Uncaught error in handler thread: %s"    "Client will not get any response from Roxen.\n"),*/    describe_backtrace(q));    if (q = catch {h = 0;}) {