[Date Prev][Date Next]
sunos4-lwp support broken (ITS#114)
Full_Name: Alexander Zangerl
OS: sunos 4.1.3u1
Submission from: (NULL) (220.127.116.11)
configure detects lwp correctly, but the compile fails with some trivial and
wants to include "ldap_log.h", nonexistant. fix: remove line
references types defined in slurpd.h :-(
fix: include this one
has a minor typo. fix: guess what.
references types defined in lwp/lwp.h and slurpd.h :-(
fix: include these headers
does reference free_stack, which does not exist.
fix: replace with ldap_pvt_thread_free_stack
and now for the uglies:
the "scheduler" thread for sleep does reference stuff that's only present
in slurpd :-(((
so, nothing that wants to link liblthread builds - except slurpd.
fix: baah, i've not really fixed that yet. hack: change the thread
define the needed data structure (Global *sglob) and initialize it, and remove
the corr. code from slurpd (ugly as hell, therefore not included in my diffs)
the scheduler thread is not killed when slapd tries to exit.
fix: none yet, one had to modify daemon.c and init.c to store the schedulers
tid somewhere and kill this one when exiting.
lwp has no per thread signals, therefore the code in daemon.c that tries
to pthread_kill the listener thread does not work.
fix: none yet, me thinks slapd should lwp_destroy the mentioned threads.
i include a diff of the relevant files against my hacked version.
diff -ubr openldap-1.2.0-unpatched/libraries/liblthread/thr_lwp.c
--- openldap-1.2.0-unpatched/libraries/liblthread/thr_lwp.c Fri Jan 29
+++ openldap-1.2.0/libraries/liblthread/thr_lwp.c Tue Mar 23 15:55:19
@@ -32,13 +32,16 @@
#define MAX_STACK 51200
-#define MAX_THREADS 20
+#define MAX_THREADS 50
+extern Globals *sglob;
* Initialize LWP by spinning of a schedular
@@ -178,7 +192,7 @@
ldap_pvt_thread_cond_signal( ldap_pvt_thread_cond_t *cond )
- return( cond->lcv_created ? cv_notify( cv->lcv_cv ) : 0 );
+ return( cond->lcv_created ? cv_notify( cond->lcv_cv ) : 0 );
diff -ubr openldap-1.2.0-unpatched/libraries/liblthread/thr_sleep.c
--- openldap-1.2.0-unpatched/libraries/liblthread/thr_sleep.c Fri Jan 29
+++ openldap-1.2.0/libraries/liblthread/thr_sleep.c Tue Mar 23 14:21:30
@@ -47,6 +47,8 @@
@@ -145,7 +147,7 @@
mon_exit( &sglob->tsl_mon );
- free_stack( stackno );
+ ldap_pvt_thread_free_stack( stackno );
#endif /* HAVE_LWP */