[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: Vicente Hernando Ara
Subject: Cthread2Pthread
Date: 01 Dec 2002 04:11:05 +0100

Hi all!

When changing cthread code to pthread i have found this problem:

In file hurd/libpipe/pipe.c appear the following functions:

condition_implies and condition_unimplies

What are the best way to change them to pthread?

form cprocs.c and libpthread/sysdeps/generic/bits/condition.h ... files:

condition_implies (condition_t implicator, condition_t implicatand)
  struct cond_imp *imp;
  imp = malloc (sizeof (struct cond_imp));
  imp->implicatand = implicatand;
  imp->next = implicator->implications;
  implicator->implications = imp;

typedef struct condition {
        spin_lock_t lock;
        struct cthread_queue queue;
        const char *name;
        struct cond_imp *implications;
} *condition_t;

struct __pthread_cond
    __pthread_spinlock_t __lock;
    struct __pthread *__queue;
    struct __pthread_condattr *__attr;
    struct __pthread_condimpl *__impl;
    void *__data;

I use hurd-20021118 debian source package.

struct condition and __pthread_cond look similar. Coding a
condition_implies replacement with __pthread_condimpl instead cond_imp
seems easy, but i dont find __pthread_condimpl definition anywhere.

Can anyone enlight me on that?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]