-*-text-*- PTL-2.1.9 ========= * fixed: pthread_kill() does not restore the critical level when given signal number is zero. * New API: POSIX readdir_r. * fixed: interruption by a signal whose handler is SIG_SIGWAIT_NP may cause infinite loop. * fixed: PTL's internal SIGSEGV handler gets strange arguments on a system that has POSIX-based signal facility. PTL-2.1.8 ========= * Works on FreeBSD 4.2R. * fixed: read(), read_timedwait(), readv(), readv_timedwait() fall into infinite loop if the underlying system calls return with EIO error. PTL-2.1.7 ========= * fixed: priority queue, used in condition variable, mutex and join, might be corrupted if multiple threads in different priorities are blocking on the same queue. * fixed: fopen() and fdopen() do not unlock the mutex for the stdio. PTL-2.1.6 ========= * Header file fixes for -DPTL_NO_RENAME * support nonblocking I/O mode (fcntl(fd, F_SETFL, O_NONBLOCK)). PTL-2.1.5 ========= * Add wait3() and wait4(). * fixed: wait() or waitpid() might not return even after a child process exits. * fixed: bug in close() and pipe(). * fixed: processes might hang up if a signal interrupts within a critical region. PTL-2.1.4 ========= * fixed: a bug causes stack overflow if the process is interrupted by a UNIX signal frequently. * fixed: sigwait() causes SIGSEGV. * deferred cancellation is processed within BSD socket APIs. PTL-2.1.3 ========= * Mutex and Condition Variable bug fixes. * Make possible to use PDB on a system like FreeBSD 3.x, which is impossible to access environment variables from _init section function.. * fixed: deferred cancellation request is processed properly. * pthread_mutex_lock() is now NOT a cancellation point, as POSIX requires. PTL-2.1.2 ========= * Minor bug fixes. PTL-2.1.1 ========= * fixed: send(), sendto() and sendmsg() do not complete writing if the underlying system call returns with EWOULDBLOCK. * On systems that PTL can set the stack pointer without using sigstack() (i.e. sparc, m68k, mips, alpha and i386 box with gcc), SIGUSR2 can be used for user's purpose. PTL-2.1 ======= * the version number convention is changed due to Y2K :-) * fixed: a thread does not finish executing cleanup handlers if the thread is blocked. * PDB: Add `iostat' command. * pthread_mutex_t, pthread_cond_t are changed from `pointer to a struct' to `struct' to avoid lazy mutex/cond initialization. * pthread_condattr_t is changed from integer handle to struct. * pthread_{mutex_,cond_,}setname_np, pthread_key_create and pthread_setspecific return ENOMEM if internal malloc() returns NULL (rather than abort()). * fixed: I/O blocking problem in SunOS5. * PTL works on Solaris7. PTL2-current-990622-patch#5 =========================== * fixed: a signal might be delivered to an already exited thread, which made `$Not reached at pthread.c, line 299'. PTL2-current-990622-patch#4 =========================== * fixed: PTL cannot be compiled on NetBSD/sparc. PTL2-current-990622-patch#3 =========================== * fixed: a thread created with PTHREAD_CREATE_SUSPENDED_NP does not start correctly. PTL2-current-990622-patch#2 =========================== * ftrylockfile() is supported. * PDB: `suspend all' and `resume all' are supported. pdb's suspend command is independent of pthread_suspend_np(). `ps' command shows `#' mark on suspended threads by pthread_suspend_np(), and `!' mark on suspended thread by pdb. * if $PTL_DEBUG_PORT has `:wait' modifier (e.g. setenv PTL_DEBUG_PORT 9999:wait), program execution is deferred until debugger connection is made. * pthread_mutex_unlock() now checks owner of the mutex and if it is not owned by the calling thread, it returns EPERM (and also displays warning message). * New API: void pthread_debug_pdb_np(const char *fmt, ...) This function adds a formatted message into PTL internal ring buffer. This ring buffer can be shown by pdb's `dmesg' command. Also, while pdb connections is available, the message is shown in user's debugging terminal. * New API: void pthread_debug_printf_np(const char *fmt, ...) This function shows a formated message to stdout atomically. (i.e. without any context switching). * libPTL.so's shared library version number is incremented from 1.1 to 1.2. * fixed: process's pending signals are not delivered after thread is resumed. * fixed: ptlgcc does not accept arguments with spaces. PTL2-current-990622-patch#1 =========================== * fixed: avoid critical race condition in locking FILE*. * fixed: Even while a thread is executing its cleanup handlers, pthread_setcancelstate() and pthread_testcancel() calls pthread_exit(). PTL2-current-990622 =================== * fixed: pthread_cancel() may hangup the process. * fixed: a thread is hangup if it is pthread_cancel()ed while it runs stdio function. PTL2-current-990512-patch#4 =========================== * if -DPTL_NO_RENAME is given, following blocking function are not #define'ed. pthread_mutex_lock, pthread_cond_wait, pthread_cond_timedwait, pthread_join, sigwait, nanosleep, and sleep. * fixed: select dumps core if nfds > FD_SETSIZE. PTL2-current-990512-patch#3 =========================== * ptlgcc and ptlg++ work on gcc-2.7.*. * fixed: using PTL2 from C++ causes SIGSEGV on FreeBSD-3.1. PTL2-current-990512-patch#2 =========================== * fixed: sigsetjmp bug. * fixed: make gettimeofday() not called with context switch of a SCHED_OTHER thread. PTL2-current-990512-patch#1 =========================== * fixed: Unnecessary heap memory stack was allocated whenever creating a new thread. * default thread attribute is changed; default stack property is changed from PTHREAAD_STACK_SAFE_NP to PTHREAD_STACK_NONE_NP. * fixed: ioctl is not renamed in . This will help of NetBSD. * fixed: typedef jmp_buf was not array. * fixed: sigsetjmp bug. PTL2-current-990512 =================== * new command ptlg++ as analogue of ptlgcc. * new sample program (sample/cplusplus.cxx) for using from C++. * fixed: suspending from terminal (i.e. ^Z) causes SIGSEGV. * incorporate changes of ptl2 package of NetBSD. * vfork() is supported. In PTL, vfork() is equivalent to fork(). * system() is supported. * more C++ friendly. PTL is initialized before global constructors are called. (with gcc and _init(). see below). * PTL initialization is done by using _init() function on shared library and using gcc's __attribute__((constructor)) on static library. In shared library: if (gcc) then { if (_init() can call dlopen() successfully) use _init() else { use per object constructor () (C++ program using global constructors will not work) } } else { #define main __pthread_main () } In static library: if (gcc) then { _pthread_init() in PTL is a constructor. } else { #define main __pthread_main () } * implementation of sigwait() is simplified. PTL2-current-990325 =================== * changed: if -E is given to ptlgcc, ptlgcc acts like normal gcc. (i.e. it does not include PTL init file) * fixed: execve() (alarm timer inheritance problem introduced in PTL2-current-990302). * threaded perl (perl-5.005.02) does work with this version of PTL. sh Configure -Dusethreads -Uusemymalloc -Dcc=ptlgcc -d ... Edit config.sh. (add -lPTL just before -lc in libs= line, e.g. libs='-lm -lPTL -lc -lposix -lcrypt' in FreeBSD-2.2.7) PTL2-current-990319 =================== * ptlgcc (compile driver) is installed to /usr/local/bin (default). * PTL's stdio functions are not renamed (like _proof_printf) now. * signal functions workaround for NetBSD-current is added. * ttyname_r is added. PTL2-current-990302 =================== * POSIX compliant fork() and pthread_atfork() are added. * PTL uses OS provided struct sigaction. PTL2-current-990215-patch#1 =========================== * fixed: pthread_mutex_destroy and pthread_cond_destroy does not free memory. PTL2-current-990215 =================== * perl-5.005.02 can be built successfully with multi-threading support! (on my FreeBSD 2.2.7) * wait() and waitpid() are added. * pthread_mutex_t, pthread_cond_t is changed to pointer to struct. This avoids some application level bugs due to misuse of these types. * some signal related serious bugs are fixed. PTL2-current-990204-patch#2 =========================== * This patch is released because patch#1 is corrupted. PTL2-current-990204-patch#1 =========================== * PTL works on sizeof(long) == 8 machines again. (eg. NetBSD/alpha) * It is not necessary to include from user's source code. * Provides experimental compilation driver `ptlgcc' in A.* dir. (but not installed yet). You can compile pthreaded program by "ptlgcc foo.c" if you have gcc 2.8.0 or later. * some bug fix. PTL2-current-990204 =================== * Little source code cleanup. * Support NetBSD-current (1.3I). * If system's libc supports asctime_r(), ctime_r(), localtime_r(), gmtime_r(), PTL does not provide them. * Fixed: asctime_r(), ctime_r() is not POSIX 1003.1c compliant. PTL2-current-981201-patch#2 =========================== * Context switching performance is much improved on machines whose sizeof(sigset_t) > 4. PTL2-current-981201-patch#1 =========================== * `make install' problem is fixed. PTL2-current-981201 =================== * COPYING is modified due to incorporating MIT pthread package. * Incoporates following functions from MIT pthread packages. gethostbyaddr_r, gethostbyname_r, gethostent_r, getnetbyaddr_r, getnetbyname_r, getnetent_r, getprotobyname_r, getprotobynumber_r, getprotoent_r, getservbyname_r, getservbyport_r, getservent_r * Add following timedout-I/O functions. These function takes additional struct timespec* arg (absolute time). When I/O is not complete within the time, errno = ETIMEDOUT and -1 is returned. However, partial write is done, it returns # of bytes (>0) to be written. Maybe MIT pthread compatible. read_timedwait, write_timedwait, accept_timedwait, connect_timedwait, readv_timedwait, writev_timedwait, send_timedwait, sendto_timedwait, sendmsg_timedwait, recv_timedwait, recvfrom_timedwait, recvmsg_timedwait Note that these functions are not tested. Please test them :-) * PDB: `timeq' command shows current UNIX time. * PDB: command line option -+-port=XXXX to invoke PDB is obsoleted. Use `setenv PTL_DEBUG_PORT=XXXX' instead. * If shared library is supported by the operating system, PTL builds shared library (libPTL.so) in addition to static library (libPTL.a). Currently, shared library is available on SunOS4, Solaris2, Linux, FreeBSD, NetBSD. * Now PTL use gcc's constructor feature to initialize myself. (in ). * Library name is changed from libpthreads.a into libPTL.a. * Now PTL works on Linux-2.0.36 (redhat-5.2), Solaris 2.6 (sparc). * POSIX compliant alarm() is supported. * Fixed some major and minor bugs. ■ PTL2-current-980924-patch#1 での変更点: * Purify で見つかったバグを修正 (yasufu-i@is.aist-nara.ac.jp) ■ PTL2-current-980924 での変更点: * 移植性が悪いシステムコールを別名で呼び出す部分を libaltsys (Alternate System Call Library) として切りだした. * Solaris2.5.1 (x86) で動作するようになった. * Linux-2.0.32(redhat-5.0) で動作するようになった. * NEWS-OS6.1.2 (mips) でコンパイルは通るようになった. (シグナルを受け ると core を吐いて死んでしまう. スタックアドレスの問題?) ■ PTL2-current-980325-patch#3 での変更点: * alarm() 等を仕掛けている時に sleep() 等を実行すると assertion failed となるバグを修正 ■ PTL2-current-980325 での変更点: * SYSV の message queue, semaphore システムコール (msgsnd(), msgrcv(), semop()) のサポート. (Thanks to senda@ic.rdc.ricoh.co.jp) ■ PTL2-current-971113 での変更点: * 他の pthread 関数に合わせて pthread_getname_np, pthread_mutex_getname_np, pthread_cond_getname_np のインタフェースを 変更 旧 char *pthread_getname_np(pthread_t); char *pthread_mutex_getname_np(const pthread_mutex_t*); char *pthread_cond_getname_np(const pthread_cond_t*); 新 int pthread_getname_np(pthread_t, char**); int pthread_mutex_getname_np(pthread_mutex_t*, char**); int pthread_cond_getname_np(pthread_cond_t*, char**); * Mutex, Condition Variable 等のサイズを大幅に削減 ■ PTL2-current-971020 (Patch#1) での変更点: * PDB : デバッグ用コネクションが write() でブロックすると, assertion failed となるバグを修正. ■ PTL2-current-971020 での変更点: * PDB の改良 (詳細は README.PDB 参照) o ps コマンドが, ブロックしているスレッドの 待ちイベント, APIを呼び出したファイル名, 関数名, 行番号 を表示できるようになった. 対象の API pthread_mutex_lock pthread_cond_wait pthread_cond_timedwait pthread_join sigsuspend sigwait sleep nanosleep o broadcast コマンド (pthread_cond_broadcast へのインタフェース) が 使えるようになった * UDP 関連のシステムコール (sendmsg, sendto) のサポート * UDP のサンプルプログラムとして sample/udp_echo.c を追加 * 幾つかのバグ修正 ■ PTL2 での変更点: * API を POSIX 1003.1c ベースに変更 * creat() の処理を追加 * pthread_create() の高速化 * コンテキストスイッチの高速化 * PDB thread を, スケジューリングポリシーSCHED_FIFO, プライオリティ最大で動 作するように変更 * pthread_stack_expansion_np = 0 (自動スタック拡張なし) をデフォルトに変更 ■ current-970709 での変更点: * タイマーの精度改善 * Condition Wait で assertion failed となる場合があるバグを修正 * NetBSD-1.2 用の修正 (by AOSASA Shigeru) * HP-UX A.09.07 のサポートの追加 (復活) ■ current-970212 での変更点: * doc/manual.tex を LaTeXinfo から TeXinfo へ書き直した. doc/PTL.info*, doc/manual.ps.gz を復活 (PTL.info は Nemacs ではうまく見 えないだろう) * contrib を別アーカイブ(PTL-contrib-1.0.tar.gz) へ移動 ■ current-970207 での変更点: * UNIX のヘッダファイル, gcc のヘッダファイルの include の方法を変更. ユーザがコンパイルする際に, -I option を一つで済むようになった. ■ current-970206 での変更点: * データ構造の見直しによって, Mutex, Condition Variable のサイズを大幅減 * pthread_cond_t を int から構造体へ変更 * I/O処理を PTL 内部に取り込むことによって高速化 (従来は PTL の上位レイヤ) * I/O を割り込み(SIGIO)ベースから, ポーリングベースに修正. ポーリングする契機は, アイドル中もしくは, ポーリングタイマーが expire した 時点. ポーリングタイマーは, デフォルトでは 0.4秒毎に起動されるが, pthread_poll_interval_np で変更可能. * 全てのブロックする処理を統一して扱うように修正. これに伴って pthread_mutex_lock でブロックしている場合にキャンセルされる可能性がある. * スレッドのプライオリティに関するいくつかのバグを修正 * pthread_join によって暗黙に detach されるようになった * PTL を使ったプログラムを gprof でプロファイリングできるようになった * 1スレッドあたりの malloc block 数を4から2へ削減 (heap memory stack の場合) その他可能な限り malloc を避けるようにデータ構造の見直し * mutex, condition variable, thread creation の時間を高速化 ■ current-961211 での変更点: * BSDI2.1 のサポート * いくつかのバグ修正 ■ current-0623 での変更点: * PDB (PTL debugger) のサポート * スレッドが exit する時に, lock していた mutex を全て unlock する. * ptl-gcc スクリプトの提供. PTL を使用するプログラムをコンパイルする. * いくつかのバグ修正 ■ current-0517 での変更点: * siglongjmp する際に, sigsetjmp してから後にプッシュされた cleanup ハンドラを実行する. * SIG_SIGWAIT_NP と宣言されたシグナルが, sigwait()を実行していない スレッドに配送される可能性があるバグを修正. * extern int pthread_stack_expansion_np の導入. (スレッドスタックを拡張可能な場合にでもこの変数の値が 0 ならばスレッ ドスタックの拡張は行わない. スタックの拡張を行わない方が速度は向上す る) * FreeBSD, Linux への対応. * 共有メモリスタックの細かい実装の変更. * 内部のシグナルの取り扱いを POSIX スタイルで統一. * その他, こまかい変更多数. ■ beta1.4pre1 での変更点: * SVR4 対応の開始. (Thanks to soda@sra.co.jp, sada@kokusaidenki.co.jp) 一部 inline アセンブリコードが必要なため, gcc が必要. 現在, SPARC, 68000, MIPS, i386 のコードが用意されている. (NEC EWS-4800/330 EWS-UX Rel8.1 Rev.D (R4000), NCR System 3000 OS 2.02.00 (i386) で動作確認. ) 詳細は README.SVR4 参照 * OSF/1 でも共有メモリスタックの自動拡張が可能. ■ beta1.3 での変更点: * スレッドの開始処理の高速化のため SPARC, MIPS, M68K のアセンブリコー ドを導入. (その他の CPU の場合は C 言語のルーチンが使用される) i386 のコードもあるが, 未テストのため使用していない (see jump.c). * 大抵の UNIX では TTY への出力がデッドロックする場合があるバグを修正. * その他いくつかのバグフィックス. ■ beta1.2 での変更点: * thread proof resolver の名前を libresolv_r.a に変更. * 安全でないスタックでは, コンテキストスイッチの度にスタックポインタの 値をチェックする. * pthread_yield() は, 同一優先度のスレッド間でコンテキストスイッチを行 なうのではなく, 存在する最高優先度のスレッドにコンテキストスイッチを 行なう. * 新たに BSD4.4, DEC OSF/1 をサポート. * 環境変数 PTHREAD_NONBLOCKING_STDIN を廃止. * ログ機能の追加: スレッドの実行をモニタし, ログファイルに出力できる. src/spec.h で, #define LOGGING することによって, この機能を使用する ことができる. この機能が使える場合, 環境変数 PTHREAD_LOG が存在すれ ば, そこで指定されたファイルにログを出力する. ログビューアーとして xptllog (in contrib directory) を公開. * 新たな関数 usleep(), pthread_alloc_stack_cache_np(), pthread_attr_setstackprop_np(), pthread_attr_getstackprop_np(), mktemp(), mkstemp(), tmpnam(), tempnam(), tmpfile(), ctermid() * pthread_attr_setstackalloc_np(), pthread_attr_getstackalloc_np() の 廃止. * スレッドが終了したら, デタッチされていなくても直ちにスタックを回収す る. * SunOS 等, 非同期 I/O をサポートしている場合は, read/write はそちらを 使うように変更. ファイル入出力等でもプロセス全体がブロックしない. * デタッチされているスレッドに対して pthread_join() を呼び出すと, errno = EINVAL で -1 を返すようにした. * C++ から呼び出せるように修正. * ライブラリを gcc でコンパイルしても, cc からリンクすることが可能になっ た. * その他, たくさんのバグフィックス. ■ beta1.1 での変更点: * localtime_r(), gmtime_r(), asctime_r(), ctime_r() のバグを修正. * struct timespec のメンバ名の間違いを修正. tv_usec -> tv_nsec. * ライブラリの初期化時に共有メモリ, mprotect() が使用できるかをテスト し, 使用できないならば, それらのスタックの使用をあきらめる. * 非同期シグナルが, 現在実行中でないスレッドに配送された場合, 配送され たスレッドが, 「シグナルをアンブロックしているスレッドのリスト」から 外されてしまうので, 次のシグナルを受け取らなくなるバグを修正. * _exit() を呼ぶと, 標準入出力をノンブロッキングモードにしたまま終了す る不具合を修正. * スレッドのサスペンド機能の追加. 以下の関数を新たに作成 pthread_suspend_np() pthread_resume_np() pthread_attr_setsuspended_np() pthread_attr_getsuspended_np()