/[hurd]/hurd-l4/libhurd-cap-server/bucket-manage-mt.c
ViewVC logotype

Diff of /hurd-l4/libhurd-cap-server/bucket-manage-mt.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by neal, Tue Nov 30 10:57:52 2004 UTC revision 1.13 by marcus, Wed Dec 1 13:26:43 2004 UTC
# Line 168  manage_demuxer (hurd_cap_rpc_context_t c Line 168  manage_demuxer (hurd_cap_rpc_context_t c
168       reference for the client entry.  */       reference for the client entry.  */
169    
170    pthread_mutex_lock (&client->lock);    pthread_mutex_lock (&client->lock);
171    while (!err && client->state != _HURD_CAP_STATE_GREEN)    /* First, we have to check if the class is inhibited, and if it is,
172         we have to wait until it is uninhibited.  */
173      if (client->state == _HURD_CAP_STATE_BLACK)
174        err = ECAP_NOREPLY;
175      else if (client->state != _HURD_CAP_STATE_GREEN)
176      {      {
177        if (client->state == _HURD_CAP_STATE_BLACK)        pthread_mutex_unlock (&client->lock);
178          err = ECAP_NOREPLY;        pthread_mutex_lock (&bucket->client_cond_lock);
179        else        pthread_mutex_lock (&client->lock);
180          err = hurd_cond_wait (&bucket->cond, &bucket->lock);        while (!err && client->state != _HURD_CAP_STATE_GREEN)
181            {
182              if (client->state == _HURD_CAP_STATE_BLACK)
183                err = ECAP_NOREPLY;
184              else
185                {
186                  pthread_mutex_unlock (&client->lock);
187                  err = hurd_cond_wait (&bucket->client_cond,
188                                        &bucket->client_cond_lock);
189                  pthread_mutex_lock (&client->lock);
190                }
191            }
192          pthread_mutex_unlock (&bucket->client_cond_lock);
193      }      }
194    if (err)    if (err)
195      {      {

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26