[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cthreads to pthreads conversion
From: |
Thomas Thomas |
Subject: |
cthreads to pthreads conversion |
Date: |
Tue, 15 May 2012 15:53:40 -0700 (PDT) |
So, I have gotten this patch back to where Barry had it in 2008:
It needs testing. Specific changes that I have made are to remove the need for
condition_implies from console-client, pfinet, term, and trans. I, mostly,
followed the pattern set by Vicente in libpipe. (Which was in a strange state
in Barry's patch.) I also audited uses of trylock due to the return values
changing from cthreads to pthreads. The only questionable piece of code is
marked "BDD - Is this sane?" in ufs/sizes.c. I think Barry's replacement is
correct.
Compiling notes:
The patch should apply cleanly to HEAD as of May 14, 2012.
You need an implementation of hurd_condition_wait in libpthread: I will attach
Vicente's, which he put in sysdeps/hurd.
I had to comment out the declaration of hurd_condition_wait in
/usr/include/cthreads.h for the new one to compile.
I had to give the absolute path to libpthread2.a in libpthread.a to get the
linker to link to it. Without doing so, the linker would use the
libpthread2.a somewhere in /lib/, and I would get undefined references to
hurd_condition_wait.
Finally, I had to apply the have_kernel_resources branch to libpthreads. A
broken patch is better than no patch. It is personally frustrating to me to be
changing the source from a working threading library to one which does not
work. At all. Given the code, programs should always fail at the first
pthread_create.
Anyway... this is for testing. Most of the code changes were done by Barry
deFreese and Vicente Ara. I got the code back up to HEAD, and made some minor
changes/corrections.
Thomas DiModica
PS. When I typed in "make install", the system tries to boot with a read-only
file system. I can get to a shell, but alot of things don't start right. How
do I fix this?
THEPatch.gz
Description: GNU Zip compressed data
cancel-cond.c
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cthreads to pthreads conversion,
Thomas Thomas <=