From 48fa239ecaf5c5e38c7f5a769b6e0aca5da155b5 Mon Sep 17 00:00:00 2001 From: Hossein Ajallooiean Date: Fri, 6 Oct 2017 14:12:15 +0200 Subject: [PATCH] initial commit --- ANNOUNCE | 82 + AUTHORS | 23 + COPYING | 506 + ChangeLog | 2767 +++++ HACKING | 164 + HISTORY | 110 + INSTALL | 218 + Makefile.in | 464 + NEWS | 91 + PORTING | 277 + README | 86 + SUPPORT | 48 + TESTS | 160 + THANKS | 119 + USERS | 32 + aclocal.m4 | 1629 +++ config.guess | 1471 +++ config.param | 67 + config.sub | 1599 +++ configure | 27194 +++++++++++++++++++++++++++++++++++++++++++ configure.ac | 669 ++ libtool.m4 | 6397 ++++++++++ ltmain.sh | 6863 +++++++++++ pth-config.1 | 238 + pth-config.in | 141 + pth-config.pod | 156 + pth.3 | 2359 ++++ pth.h.in | 588 + pth.m4 | 402 + pth.pod | 2447 ++++ pth.spec | 111 + pth_acdef.h.in | 288 + pth_acmac.h.in | 64 + pth_attr.c | 314 + pth_cancel.c | 131 + pth_clean.c | 85 + pth_compat.c | 53 + pth_data.c | 133 + pth_debug.c | 114 + pth_errno.c | 56 + pth_event.c | 433 + pth_ext.c | 103 + pth_fork.c | 99 + pth_high.c | 1498 +++ pth_lib.c | 630 + pth_mctx.c | 561 + pth_msg.c | 147 + pth_p.h.in | 131 + pth_pqueue.c | 256 + pth_ring.c | 245 + pth_sched.c | 854 ++ pth_string.c | 706 ++ pth_sync.c | 382 + pth_syscall.c | 725 ++ pth_tcb.c | 150 + pth_time.c | 182 + pth_uctx.c | 202 + pth_util.c | 184 + pth_vers.c | 46 + pthread-config.1 | 231 + pthread-config.in | 133 + pthread-config.pod | 147 + pthread.3 | 8313 +++++++++++++ pthread.c | 1167 ++ pthread.h.in | 592 + pthread.pod | 9841 ++++++++++++++++ pthread.ps | Bin 0 -> 85118 bytes rse-pmt.ps | Bin 0 -> 135137 bytes shtool | 1781 +++ striptease.mk | 74 + striptease.pl | 161 + test_common.c | 124 + test_common.h | 32 + test_httpd.c | 230 + test_misc.c | 145 + test_mp.c | 183 + test_philo.c | 214 + test_pthread.c | 111 + test_select.c | 102 + test_sfio.c | 129 + test_sig.c | 150 + test_std.c | 153 + test_uctx.c | 151 + 83 files changed, 90414 insertions(+) create mode 100644 ANNOUNCE create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 HACKING create mode 100644 HISTORY create mode 100644 INSTALL create mode 100644 Makefile.in create mode 100644 NEWS create mode 100644 PORTING create mode 100644 README create mode 100644 SUPPORT create mode 100644 TESTS create mode 100644 THANKS create mode 100644 USERS create mode 100644 aclocal.m4 create mode 100755 config.guess create mode 100644 config.param create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.ac create mode 100644 libtool.m4 create mode 100644 ltmain.sh create mode 100644 pth-config.1 create mode 100644 pth-config.in create mode 100644 pth-config.pod create mode 100644 pth.3 create mode 100644 pth.h.in create mode 100644 pth.m4 create mode 100644 pth.pod create mode 100644 pth.spec create mode 100644 pth_acdef.h.in create mode 100644 pth_acmac.h.in create mode 100644 pth_attr.c create mode 100644 pth_cancel.c create mode 100644 pth_clean.c create mode 100644 pth_compat.c create mode 100644 pth_data.c create mode 100644 pth_debug.c create mode 100644 pth_errno.c create mode 100644 pth_event.c create mode 100644 pth_ext.c create mode 100644 pth_fork.c create mode 100644 pth_high.c create mode 100644 pth_lib.c create mode 100644 pth_mctx.c create mode 100644 pth_msg.c create mode 100644 pth_p.h.in create mode 100644 pth_pqueue.c create mode 100644 pth_ring.c create mode 100644 pth_sched.c create mode 100644 pth_string.c create mode 100644 pth_sync.c create mode 100644 pth_syscall.c create mode 100644 pth_tcb.c create mode 100644 pth_time.c create mode 100644 pth_uctx.c create mode 100644 pth_util.c create mode 100644 pth_vers.c create mode 100644 pthread-config.1 create mode 100644 pthread-config.in create mode 100644 pthread-config.pod create mode 100644 pthread.3 create mode 100644 pthread.c create mode 100644 pthread.h.in create mode 100644 pthread.pod create mode 100644 pthread.ps create mode 100644 rse-pmt.ps create mode 100755 shtool create mode 100644 striptease.mk create mode 100644 striptease.pl create mode 100644 test_common.c create mode 100644 test_common.h create mode 100644 test_httpd.c create mode 100644 test_misc.c create mode 100644 test_mp.c create mode 100644 test_philo.c create mode 100644 test_pthread.c create mode 100644 test_select.c create mode 100644 test_sfio.c create mode 100644 test_sig.c create mode 100644 test_std.c create mode 100644 test_uctx.c diff --git a/ANNOUNCE b/ANNOUNCE new file mode 100644 index 0000000..fa1b6b8 --- /dev/null +++ b/ANNOUNCE @@ -0,0 +1,82 @@ + ____ _ _ + | _ \| |_| |__ + | |_) | __| '_ \ ``Only those who attempt + | __/| |_| | | | the absurd can achieve + |_| \__|_| |_| the impossible.'' + + GNU Pth - The GNU Portable Threads + Version 2.0 + + Pth is a very portable POSIX/ANSI-C based library for Unix platforms + which provides non-preemptive priority-based scheduling for multiple + threads of execution (aka "multi-threading") inside event-driven + applications. All threads run in the same address space of the server + application, but each thread has its own individual program-counter, + run-time stack, signal mask and errno variable. + + The thread scheduling itself is done in a cooperative way, i.e., the + threads are managed and dispatched by a priority- and event-driven + non-preemptive scheduler. The intention is that this way both better + portability and run-time performance is achieved than with preemptive + scheduling. The event facility allows threads to wait until various + types of internal and external events occur, including pending I/O on + file descriptors, asynchronous signals, elapsed timers, pending I/O + on message ports, thread and process termination, and even results of + customized callback functions. + + Pth also provides an optional emulation API for POSIX.1c threads + ("Pthreads") which can be used for backward compatibility to existing + multi-threaded applications. + + NEW IN PTH 2.0 + + Pth 2.0 provides more strict POSIX.1-2001/SUSv3 compliant wrapper + functions in its high-level I/O API. Most notable, the implementations + of pth_poll(3) and pth_select(3) were completely worked off in order + to achieve POSIX semantics. A Pth variant of the new POSIX pselect(2) + function was introduced, too. + + Pth now has support for arbitrary (usually higher than the default) + FD_SETSIZE values to support larger-scale server applications. + + A new environment attribute PTH_ATTR_DISPATCHES allows the application + to query the total number of machine context dispatches Pth performed + since the last attribute reset. + + Pth's internal machine context implementation is now exported in a + sub-API pth_uctx in order to allow applications to use raw user-space + context switching. This can be used to implement co-routines, + exception handling or even an alternative multi-threading environment + with the help of Pth. + + The "hard syscall mapping" functionality was completely rewritten + from scratch. Previously, the internal system call exit points were + based on syscall(2) only. This was problematic because it by-passed + the C library glue code which often performs necessary glue code in + order to call the code in the kernel correctly. Now the internal exit + points are based on a by-system-call dynamically selected combination + of RTLD_NEXT+dlsym(2), dlopen(2)+dlsym(2) and the known syscall(2) (in + this fallback order). This way the "hard syscall mapping" became a lot + more portable and flexible. + + Optional support for OSSP ex based exception handling was added which + allows ISO C applications to use fully multi-threading aware ISO C++ + style exception handling. + + Finally, the Pth build environment was upgraded to be now based on GNU + autoconf 2.57, GNU shtool 1.6.2 and GNU libtool 1.4.3. + + MORE INFORMATION + + More details about Pth can be found at the following locations from + the GNU and OSSP projects: + + o GNU: http://www.gnu.org/software/pth/ + o GNU: ftp://ftp.gnu.org/gnu/pth/ + o OSSP: http://www.ossp.org/pkg/lib/pth/ + o OSSP: ftp://ftp.ossp.org/pkg/lib/pth/ + + Ralf S. Engelschall + rse@engelschall.com + www.engelschall.com + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..b2368ed --- /dev/null +++ b/AUTHORS @@ -0,0 +1,23 @@ + ____ _ _ + | _ \| |_| |__ + | |_) | __| '_ \ ``Some people have entirely too + | __/| |_| | | | much free time on their hands.'' + |_| \__|_| |_| -- Gene Spafford + + GNU Pth - The GNU Portable Threads + + AUTHORS + ======= + + This is a list of authors who have written + or edited major parts of the GNU Pth sources. + + o GNU Pth (as a whole): + Written by: Ralf S. Engelschall + Edited by: Ralf S. Engelschall + + o pthread.pod: + Written by: Ralf S. Engelschall + Parts from: The Open Group + Edited by: Ralf S. Engelschall + diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..2207e93 --- /dev/null +++ b/COPYING @@ -0,0 +1,506 @@ + ____ _ _ + | _ \| |_| |__ ``Ian Fleming was a UNIX fan! + | |_) | __| '_ \ How do I know? Well, James Bond + | __/| |_| | | | had the (license to kill) number 007, + |_| \__|_| |_| i.e., he could execute anyone!'' + + GNU Pth - The GNU Portable Threads + + LICENSE + ======= + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + For some people, it is not clear, what is the real intention of the + author by using the GNU Lesser General Public License (LGPL) as the + distribution license for GNU Pth. This is, because the LGPL and the + GPL can be (and are often) interpreted very differently and some + interpretations seem to be not compatible with others. So an explicit + clarification for the use of the LGPL for GNU Pth from the authors + point of view might be useful. + + The author places this library under the LGPL to make sure that it + can be used both commercially and non-commercially provided that + modifications to the code base are always donated back to the official + code base under the same license conditions. Please keep in mind that + especially using this library in code not staying under the GPL or + the LGPL _is_ allowed and that any taint or license creap into code + that uses the library is not the authors intention. It is just the + case that _including_ this library into the source tree of other + applications is a little bit more inconvinient because of the LGPL. + But it has to be this way for good reasons. And keep in mind that + inconvinient doesn't mean not allowed or even impossible. + + Even if you want to use this library in some BSD-style licensed + packages, this _is_ possible as long as you are a little bit + carefully. Usually this means you have to make sure that the code is + still clearly separated into the source tree and that modifications to + this source area are done under the conditions of the LGPL. Read below + for more details on the conditions. Contact the author if you have + more questions. + + The license text of the GNU Lesser General Public License follows: + __________________________________________________________________________ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..61949b9 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,2767 @@ + ____ _ _ + | _ \| |_| |__ + | |_) | __| '_ \ ``Just because everything is different + | __/| |_| | | | doesn't mean anything has changed.'' + |_| \__|_| |_| -- Irene Peter + + GNU Pth - The GNU Portable Threads + + ChangeLog + ========= + + This is the list of all(!) changes to this Pth source tree. For a list + of just the user-visible and/or major changes please have a look at + the NEWS file. + + ____ ___ + |___ \ / _ \ + __) || | | | + / __/ | |_| | + __|_____(_)___/_________________________________________________________ + + Changes between 2.0.6 and 2.0.7 (22-Nov-2005 to 08-Jun-2006) + + *) Upgraded build environment from GNU shtool 2.0.3 to 2.0.6 + and from GNU libtool 1.5.20 to 1.5.22. + [Ralf S. Engelschall] + + *) Let AC_CHECK_PTH use "pth-config --libs --all" instead of just + "pth-config --libs" to allow it to work under platforms like + Solaris where additional libraries are required. + [Ralf S. Engelschall] + + *) Adjusted all copyright messages for new year 2006. + [Ralf S. Engelschall] + + Changes between 2.0.5 and 2.0.6 (05-Oct-2005 to 22-Nov-2005) + + *) Add a missing "break" in pth_attr.c:pth_attr_ctrl(). + [Stefan Schippers ] + + *) Return an error if pth_kill() is called before pth_init(). + [Martin Kraemer ] + + Changes between 2.0.4 and 2.0.5 (18-Feb-2005 to 05-Oct-2005) + + *) Upgraded build environment to GNU libtool 1.5.20 and + GNU shtool 2.0.3 + [Ralf S. Engelschall] + + Changes between 2.0.3 and 2.0.4 (03-Dec-2004 to 18-Feb-2005) + + *) Fix internal determination of maximum number in a size_t in + the string formatter engine. + [Ralf S. Engelschall] + + *) Upgraded build environment to GNU libtool 1.5.14 + [Ralf S. Engelschall] + + *) Add quotes around function names for AC_DEFUN in pth.m4 to avoid + warnings about "underquoted definitions". + [Stephane Loeuillet ] + + *) Adjusted all copyright messages for new year 2005. + [Ralf S. Engelschall] + + *) Do not insist on writing to the source directory on "make install" + in order to more closely follow GNU standards. + [Bruno Haible ] + + *) Remove "*.bak" and "*~" files under "make distclean" + instead of "make clean". + [Bruno Haible ] + + Changes between 2.0.2 and 2.0.3 (12-Sep-2004 to 03-Dec-2004) + + *) Resurrect the old "make striptease" command by fixing the + configure run-time in the stripped down source tree and fixing the + list of source files. + [Ralf S. Engelschall] + + *) The pth_uctx_save() and pth_uctx_restore() API functions + unfortunately were broken by design because they are C + _functions_. This leads to one more deadly nesting on the + run-time stack which effectively caused the pth_mctx_restore() + in pth_uctx_restore() to return to the end of pth_uctx_save() + but then the control flow unfortunately returns to the + pth_uctx_restore() caller instead of the pth_uctx_save() caller + because the call to pth_uctx_restore() had already overwritten the + run-time stack position where the original return address for the + pth_uctx_save() call was stored. + + The only workaround would be to #define pth_uctx_save() and + pth_uctx_restore() as C _macros_, but this then would require that + lots of the GNU Pth internals from pth_mctx.c would have to be + exported in the GNU Pth API (which in turn is not acceptable). So, + the only consequence is to remove the two functions again from the + GNU Pth API. + [Ralf S. Engelschall, Stefan Brantschen ] + + *) Enhance internal pth_mctx_save() if getcontext(3) is used for the + machine context saving by better emulating the setjmp(3) style + return code semantics. + [Ralf S. Engelschall] + + *) Do not break in pth_msgport_find() if a message port + was created with a NULL name. + [Ralf S. Engelschall] + + *) Better error checking in pth_key_xxx() functions. + [Ralf S. Engelschall] + + *) Added PTH_CTRL_FAVOURNEW control which allows the user + to disable the favouring of new threads on scheduling + to get more strict priority based scheduling behavior. + [Ralf S. Engelschall, Vinu V ] + + *) Upgraded build environment to GNU libtool 1.5.10 + [Ralf S. Engelschall] + + Changes between 2.0.1 and 2.0.2 (13-Jul-2004 to 12-Sep-2004) + + *) Added hard syscall wrappers for send(2) and recv(2). + [NetBSD pkgsrc patches] + + *) Internally handle errors returned from pth_event() in order + to pass them upstream to the caller in pth_high.c functions. + [Ralf S. Engelschall, NetBSD pkgsrc patches] + + *) Fix syscall wrapper for sendto(2). + [NetBSD pkgsrc patches] + + *) Use "(char *)NULL" instead of plain "NULL" in last argument to + execl(2) to avoid GCC 3.5's "warning: missing sentinel in function call". + [Ralf S. Engelschall] + + *) Workaround Autoconf/m4 problems in pth.m4 by using "m4_define" + instead of just "define" and no using m4_undefine at all. + [Dr. Andreas Mueller ] + + *) Avoid side-effects by defining _XOPEN_SOURCE only temporarily + for inclusion of instead of permanently. + [Graham Nash ] + + *) Workaround GCC 2.x and 3.5 (3.4 worked fine) macro parsing + behaviour by using a pre-declared function pointer type "typedef + int (*pth_event_func_t)(void *);" instead of using an inlined + "int (*)(void *)". + [Ralf S. Engelschall, Robert Anderson ] + + *) Fixed prototype for pthread_attr_setschedparam(3) from + to use a "const struct sched_param *" argument. + [Rafael Ávila de Espíndola ] + + *) Upgraded build environment to GNU libtool 1.5.8 + and GNU shtool 2.0.1. + [Ralf S. Engelschall] + + Changes between 2.0.0 and 2.0.1 (17-Feb-2003 to 13-Jul-2004) + + *) Fix handling/casting of "int (*)(void *)" callback functions. + [Ralf S. Engelschall] + + *) Resolve symbol conflict in pth_string.c between pow10/round + and GCC builtins. + [Ralf S. Engelschall] + + *) Use GCC 3.3 option "-fno-strict-aliasing" (if available) under + Autoconf option "--enable-debug" because mainly pth_mctx.c + contains important and correct pointer casting constructs which + are not acceptable in "strict aliasing" for GCC. + [Ralf S. Engelschall] + + *) Upgraded build environment to GNU autoconf 2.59, GNU libtool 1.5.6 + and GNU shtool 2.0.0. + [Ralf S. Engelschall] + + *) Fixed implementation so that --enable-pthread now correctly + implies --enable-syscall-soft. + [Steve Alstrin , Ralf S. Engelschall] + + *) Replace some 0 by more politically correct NULL in pth_string.c + [Ralf S. Engelschall] + + *) Adjusted all copyright messages for new year 2004. + [Ralf S. Engelschall] + + Changes between 2.0b2 and 2.0.0 (04-Dec-2002 to 17-Feb-2003) + + *) Final source tree polishing before release. + [Ralf S. Engelschall] + + *) Wrote summary for Pth 2.0 for the ANNOUNCE document. + [Ralf S. Engelschall] + + *) Adjusted all copyright messages for new year 2003. + [Ralf S. Engelschall] + + Changes between 2.0b1 and 2.0b2 (08-Nov-2002 to 04-Dec-2002) + + *) Upgraded built environment to GNU Autoconf 2.57. + [Ralf S. Engelschall] + + *) Fixed compiler warnings under Linux: require inclusion of + [Joseph Wayne Norton ] + + *) Fixed error handling in pth_init(3): it now correctly + returns an error instead of abort(3)'ing. + [Ralf S. Engelschall] + + *) Added soft syscall mapping for nanosleep(3) and + usleep(3) functions also to the Pthread API. + [Ralf S. Engelschall] + + Changes between 2.0b0 and 2.0b1 (07-Nov-2002 to 08-Nov-2002) + + *) Make pth_poll(3) more compliant to POSIX.1-2001/SUSv3 poll(2). + [Ralf S. Engelschall, Nick Hudson ] + + *) Make pth_select(3) more compliant to POSIX.1-2001/SUSv3 select(2). + This especially fixes the polling-only situation (timeout = (0,0)). + [Ralf S. Engelschall] + + *) Make sure that in the even manager a polling-only select(2) call + uses a correctly initialized timeout parameter. + [Ralf S. Engelschall] + + *) Added soft and hard syscall mapping for nanosleep(3) and + usleep(3) functions. + [Ralf S. Engelschall] + + *) Fix poll(2) semantics: remove POLLRDNORM from polling + result if POLLHUP is detected. + [Paolo Bonzini ] + + *) Updated PORTING file to include community feedback from + the last months. + [Ralf S. Engelschall] + + Changes between 1.4.1 and 2.0b0 (27-Jan-2002 to 07-Nov-2002) + + *) Fix dropping of scheduler thread pools and this way fix memory leak. + [Ralf S. Engelschall] + + *) Check for PTH_FDMODE_ERROR error conditions internally, too. + [Ralf S. Engelschall] + + *) Use the new PTH_STATUS_FAILED event status in the scheduler's + event-manager for filedescriptor events if the internal select(2) + call returned with an error. Additionally this PTH_STATUS_FAILED + is recognized by the high-level API functions (pth_select, etc) + and produce the necessary POSIX conforming return codes (usually + -1 and errno == EBADF). + [Ralf S. Engelschall, Thanh Luu ] + + *) The function "int pth_event_occurred(pth_event_t)" was replaced + with "pth_status_t pth_event_status(pth_event_t)" where pth_status_t + can have values of PTH_STATUS_PENDING (replacing the old FALSE return + value of pth_event_occurred), PTH_STATUS_OCCURRED (replacing + the old TRUE return value of pth_event_occurred), and + PTH_STATUS_FAILED (a new return value indicating an error in + processing the event). This was scheduler/event-manager errors can + be indicated which happended while processing the event. For + backward compatibility reasons, a macro pth_event_occurred() was + added. This will be removed soon. + [Ralf S. Engelschall] + + *) Upgraded to latest version of the OSSP Autoconf macro + AC_CHECK_EXTLIB in order to fix problems with the current + Autoconf 2.54 environment. + [Ralf S. Engelschall] + + *) Add Autoconf option --with-fdsetsize=NUM which allows to + force a particular (usually higher than the default) FD_SETSIZE + value for building Pth. Additionally Pth makes sure that the + application using Pth does not use an even larger size. + [Nick Hudson , Ralf S. Engelschall] + + *) Added thread attribute PTH_ATTR_DISPATCHES which (in bounded + attribute objects) is incremented every time the context + is switched to the associated thread. This can be used for + statistical information. + [Ralf S. Engelschall] + + *) Added a stand-alone sub-API for manual user-space context + switching. It is somewhat modeled after the POSIX ucontext(3) + facility and consists of an opaque data type pth_uctx_t and + the management functions pth_uctx_create(), pth_uctx_make(), + pth_uctx_save(), pth_uctx_restore(), pth_uctx_switch() and + pth_uctx_destroy(). These functions are based on the same + underlying machine context switching facility (pth_mctx) + the threads in GNU Pth are using. This facility can be used + to implement co-routines without a full real multithreading + environment or even to implement an own multithreading + environment. + [Ralf S. Engelschall] + + *) Add a Pth variant of the new POSIX pselect(2) function, including + soft and hard syscall mapping support for it. + [Ralf S. Engelschall] + + *) More POSIX compliance for pth_select() in case of invalid + timeout values and invalid filedescriptors. + [Ralf S. Engelschall] + + *) Internally switch from "errno_shield {...}" to "pth_shield {...}" + and from "return_errno(..)" to "return pth_error(...)" in order to + make the internal error handling a little bit more consistent. + [Ralf S. Engelschall] + + *) Cleaned and speeded up the pth_exit() processing. + [Ralf S. Engelschall] + + *) Added POSIX-compliant sanity checks for bad filedescriptors + to mostly all filedescriptor-based I/O functions in pth_high.c + [Ralf S. Engelschall] + + *) Added pth_nanosleep() function. + [Nick Hudson , Ralf S. Engelschall] + + *) Allow a NULL name for pth_msgport_create() in order to + support locally scoped message ports which are not searched via + pth_msgport_find(). + [Ralf S. Engelschall, Matthew Mondor ] + + *) Added "hard syscall mapping" support for using + SYS___sigprocmask14 instead of SYS_sigprocmask on NetBSD. + [Nick Hudson ] + + *) Changes three direct sigprocmask(2) calls with the corresponding + "hard syscall mapping" macro calls. + [Nick Hudson ] + + *) Add Autoconf support for GNU Hurd. + [B. Douglas Hilton ] + + *) Completely rewrote the "hard syscall mapping". + + Previously the internal syscall exit points were based on syscall(2) + only. This is problematic because it by-passes the C library glue + code which sometimes performs necessary assembly fiddling in order + to call the underlying system calls correctly. Additionally, + syscall(2) does not exists everywhere. + + Now the internal exit points are based on a by-syscall dynamically + selected combination of RTLD_NEXT+dlsym(2), dlopen(2)+dlsym(2) and + the known syscall(2) (in this fallback order). This way the "hard + syscall mapping" is a lot more portable and flexible. + [Ralf S. Engelschall, Jonathan Schilling ] + + *) Added support to pth_poll(3) for the poll(2) XPG.4 flags + POLLD{RD,WR}{NORM,BAND}. + [Jason Evans , Ralf S. Engelschall] + + *) Fixed a long-standing termination bug in pth_exit(3): + The event handler of pth_exit(3) didn't let pth_exit(3) finish if + there were any threads on the "dead queue" (where non-detached + terminated threads are put). Instead it re-entered the scheduler + which in turn aborted with "**Pth** SCHEDULER INTERNAL ERROR: no + more thread(s) available to schedule!?!?". This is now fixed by + not counting the "dead queue" for the determination whether the + process as a whole should terminate or not. + [Jonathan Schilling ] + + *) The manual page stated that system(3) is supported in the + "Soft System Call Mapping", but in fact it was forgotten in the + implementation. + [Jonathan Schilling ] + + *) Add #define _PTHREAD_T to pthread.h to guard under SCO UnixWare 7 + and OpenUNIX 8. + [Jonathan Schilling ] + + *) Upgraded to Autoconf 2.54 environment and cleaned up internal + Autoconf macro usage. + [Ralf S. Engelschall] + + *) Fixed lots of English errors in the manual page. + [Felix Berger ] + + *) Add optional support for OSSP ex based exception handling. GNU + Pth (still) does not throw exceptions by itself, but handles the + per-thread exception context of OSSP ex to make exception handling + local to a thread. + [Ralf S. Engelschall] + + *) Removed all generated files from CVS. + Use OSSP devtool stuff to re-generate files on demand. + Switched to Autoconf 2.52 and Libtool 1.4.2 environment. + [Ralf S. Engelschall] + + _ _ _ + / || || | + | || || |_ + | ||__ _| + __|_(_) |_|_____________________________________________________________ + + Changes between 1.4.0 and 1.4.1 (24-Mar-2001 to 27-Jan-2002) + + *) Internally make sure an invalid file-descriptor (integer not + between 0 and (FD_SETSIZE-1) does not lead to any segfaults or + other undefined behaviour. Instead an error is returned and errno + is set to EBADF, similar to what the OS functions do. Especially + pth_poll() now return with this error (instead of skipping the fd) + if an fd in the "struct pollfd" is invalid. + [Ralf S. Engelschall, Archie Cobbs ] + + *) Correctly support PTH_FDMODE_NONBLOCK in pth_connect and pth_accept. + [Archie Cobbs ] + + *) Fixed typos in manual page. + [Michael Schloh v. Bennewitz , + Takashi Ishihara ] + + *) For portability reasons changed definition of PTH_EXT_SFIO to 0/1 + instead of FALSE/TRUE because some external definitions use a + casted value and hence make trouble on plain #if constructs. + [Staehli Patrik ] + + *) Fixed return value (number of occurred events) of pth_wait(). + [David Dureau ] + + *) Replaced thread-unsafe usage of a static struct iovec in + pth_writev_ev() with a thread-safe stack/heap-based solution. + [Ralf S. Engelschall, Mark Burton ] + + *) Replaced antiquated PTH_FLAG_NOJOIN references with the correct + PTH_ATTR_JOINABLE references in the manual page. + [Takashi Ishihara ] + + *) Fixed a (not very subtle) bug in pth_writev_ev() that screwed up + output if a partial write happened. + [Mark Burton ] + + *) Fixed static initializers PTH_BARRIER_INIT and PTH_COND_INIT. + [Shawn Wagner ] + + *) Typo fixes in pth.pod + [] + + *) Upgraded to GNU shtool, version 1.5.4. + [Ralf S. Engelschall] + + *) Fixed "make striptease": pth_string.c was not included and some + commands which were removed at all (and this way causes syntax + errors) will be now correctly commented out with ":" commands. + [Paolo Bonzini ] + + *) Fixed pth.pod: a closing angle bracket was missing, leading to + incorrect POD to XXXX formatting. + [Ralf S. Engelschall] + + Changes between 1.4a3 and 1.4.0 (29-Jul-2000 to 24-Mar-2001) + + *) Added PTHREAD_PRIO_XXXX definitions to pthread.h for + conformance to the POSIX/SUSv2 Pthread API. + [Ralf S. Engelschall, Bill Apt ] + + *) Implemented the pthread_{set,get}concurrency() API parts of + POSIX/SUSv2, although internally we are (allowed to be) free to not + do anything based on the requested level. + [Ralf S. Engelschall, Bill Apt ] + + *) Adjusted all pthread_attr_getXXXX() functions to use a "const + pthread_attr_t *" as the first argument instead of "pthread_attr_t + *" to fully-conform to POSIX/SUSv2. + [Ralf S. Engelschall, Bill Apt ] + + *) Added ENOSYS-stubs for pthread_attr_{set,get}guardsize() + to the Pthread API to be more complete with POSIX/SUSv2 specs. + [Ralf S. Engelschall, Bill Apt ] + + *) Added still missing soft system call mapping to Pth and Pthread + APIs for functions recv(2), send(2), recvfrom(2) and sendto(2). + [Ralf S. Engelschall, Bill Apt ] + + *) Upgraded to GNU shtool 1.5.2 + [Ralf S. Engelschall] + + *) Fixed an even-manager bug which causes a thread that calls + pth_nap() to never woke up if the only elapsed event was a timer. + [Archie Cobbs ] + + *) Added `#define _BITS_SIGTHREAD_H' to pthread.h to avoid inclusion + of bits/sigthread.h (from signal.h) on Linux running glibc6 2.2. + [Tomas Pihl ] + + *) Added support to Makefile.in for DESTDIR variable. This allows + easier rolling of installation tarballs (for instance from within + RPM or similar facilities) by using "make install DESTDIR=/tmp/pth". + [Brad Smith , Ralf S. Engelschall] + + *) Implemented a pth_system(3) function which is a thread-aware + clone of the POSIX system(2) function. + [Ralf S. Engelschall] + + *) Fixed typos in pth.pod: "fd" -> "s" for pth_connect/pth_accept. + [Sebastian ] + + *) Make --disable-shared the default under Solaris-2.[78]/x86, because + it is known to segfault sporadically if Pth is built as a DSO. As + traces showed, it is not a Pth problem, but it looks like a problem with + the dynamic linker on Solaris/x86. The same Solaris versions on SPARC + don't have this problem. + [Ralf S. Engelschall] + + *) Updated copyright messages to cover new year 2001. + [Ralf S. Engelschall] + + *) Fixed quoting in configure.in + [Ralf S. Engelschall] + + *) Let pth_sleep(3) and pth_usleep(3) immediately return + if an argument of zero is given. + [Ralf S. Engelschall] + + *) Fixed pthread.pod: the newer pod2man versions seems to dislike + embedded comments, so I moved them to the top of the file. + [Ralf S. Engelschall] + + *) Changed CVS URL in HACKING document. + [Ralf S. Engelschall] + + *) Mention http://www.mail-archive.com/pth-users@gnu.org/ in pth.pod + and SUPPORT document. + [Ralf S. Engelschall] + + Changes between 1.4a2 and 1.4a3 (01-Jul-2000 to 29-Jul-2000) + + *) Upgraded to GNU shtool 1.5.1 + [Ralf S. Engelschall] + + *) Fixed (unused) pth_time_mul() function: operator & replaced by % + [Tim Harris ] + + *) Use --disable-lock for ltconfig. + [Ralf S. Engelschall] + + *) Fixed a few typos in pth.pod. + [Thomas Klausner ] + + Changes between 1.4a1 and 1.4a2 (16-Apr-2000 to 01-Jul-2000) + + *) Upgraded to GNU Shtool 1.5.0 + [Ralf S. Engelschall] + + *) Added OS/390 support to config.sub. + [Greg Ames ] + + *) Upgraded rse-pmt.ps paper to latest version as it was + published on USENIX 2000. + [Ralf S. Engelschall] + + *) Stack boundary fixes for Interactive Unix support + (--with-mctx-dsp=sjljisc). This allows one also to use this + variant for Interix on Window-NT (a POSIX.1 compliant subsystem). + [Kim Jongsu ] + + *) Upgraded to GNU Libtool 1.3.5 + [Ralf S. Engelschall] + + *) Fixed config.param parsing: IF is now also allowed on + VARIABLE=VALUE lines. + [Ralf S. Engelschall] + + *) Allow for convinience reasons pth_usleep() to accept also + arguments greater than 1000000. + [Harvinder Sawhney ] + + *) Updated HACKING document. + [Ralf S. Engelschall] + + *) Fixed warnings in pth_string.c related to va_arg() usage + and implicit type conversions. + [Ralf S. Engelschall] + + *) Merge from Pth 1.3.5: + Fixed the checks in Autoconf: the logic + was reversed and this way wasn't included on + platforms were it existed and included where it wasn't present. + [M. Lavasani ] + + Changes between 1.3.3 and 1.4a1 (10-Mar-2000 to 16-Apr-2000) + + *) Added a new feature to config.param: parameters can be extended + with ``IF''. Then the preceeding + parameter is only added to the command line if the + returns 0. can be anything which is possible in a + Bourne-Shell `if' construct's expression. + [Ralf S. Engelschall] + + *) Fixed usage of `volatile' qualifier in pointer context. + [Ralf S. Engelschall] + + *) Now check also for -Wno-long-long compiler option under + --enable-debug, because pth_string.c contains `long long' stuff. + [Ralf S. Engelschall] + + *) Now pth.h and pthread.h include the non-standard + header on brain-dead platforms (like AIX) to get the definition of + fd_set (which is required for the pth_select prototype). + [Ralf S. Engelschall, Stian Seeberg ] + + *) Fixed auto-configuration for ISC and Win32/Cygwin platforms. + [Ralf S. Engelschall, Giwon On ] + + *) Removed -L. from $(LDFLAGS) in Makefile.in, because this + is not required (libtool already takes care of this). + [Ralf S. Engelschall] + + *) Added a RPM spec file pth.spec which allows one to build RPM + packages directly from the Pth distribution tarball through a + simple `rpm -tb pth-1.X.Y.tar.gz' call. + [Daniel Richard G. ] + + *) Removed the too explicit `-m 644' from the libtool/shtool + installation command for libpth.la and instead use a `umask 022'. + The reason is because some platforms require the shared libraries + to be executable, so we cannot use an explicit mode. But we use the + umask to make sure we don't result in world or group writeable files. + [Ralf S. Engelschall, Daniel Richard G. ] + + *) Use full-path /sbin/sysctl in config.guess on FreeBSD because + not all users have /sbin in their $PATH. + [Jeff Trawick ] + + *) Added eight new I/O functions pth_{recv,recvfrom,send,sendto}[_ev](3) + which correspond to the counterparts in UNIX98 (SUSv2). + [Ralf S. Engelschall] + + *) Replaced for security reasons sprintf() and vsprintf() calls + with own pth_snprintf() and pth_vsnprintf() functions from the new + pth_string.c source. + [Ralf S. Engelschall] + + *) Speeded up pth_ring_t handling by inlining code and by maintaining + number of contained nodes explicitly to avoid an O(n) operation when + the number of elements are requested. + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.4.9 + [Ralf S. Engelschall] + + _ _____ + / | |___ / + | | |_ \ + | |_ ___) | + __|_(_)____/____________________________________________________________ + + Changes between 1.3.6 and 1.3.7 (01-Jul-2000 to 29-Jul-2000) + + *) Backport from GNU Pth 1.4a3: + Upgraded to GNU shtool 1.5.1. This fixes especially the + compilation problems under Solaris which were caused by a too + unportable `shtool version' command from 1.5.0. + [Ralf S. Engelschall] + + *) Backport from GNU Pth 1.4a3: + Fixed (unused) pth_time_mul() function: operator & replaced by % + [Tim Harris ] + + Changes between 1.3.5 and 1.3.6 (17-Apr-2000 to 01-Jul-2000) + + *) Backport from GNU Pth 1.4a2: + Upgraded to GNU Shtool 1.5.0 + [Ralf S. Engelschall] + + *) Backport from GNU Pth 1.4a2: + Added OS/390 support to config.sub. + [Greg Ames ] + + *) Backport from GNU Pth 1.4a2: + Upgraded rse-pmt.ps paper to latest version as it was + published on USENIX 2000. + [Ralf S. Engelschall] + + *) Backport from GNU Pth 1.4a2: + Upgraded to GNU libtool 1.3.5 + [Ralf S. Engelschall] + + *) Backport from GNU Pth 1.4a2: + Allow for convinience reasons pth_usleep() to accept also + arguments greater than 1000000. + [Harvinder Sawhney ] + + Changes between 1.3.4 and 1.3.5 (16-Apr-2000 to 17-Apr-2000) + + *) Fixed the checks in Autoconf: the logic + was reversed and this way wasn't included on + platforms were it existed and included where it wasn't present. + [M. Lavasani ] + + Changes between 1.3.3 and 1.3.4 (10-Mar-2000 to 16-Apr-2000) + + *) Merged from Pth 1.4a1: + Fixed usage of `volatile' qualifier in pointer context. + [Ralf S. Engelschall] + + *) Merged from Pth 1.4a1: + Now pth.h and pthread.h include the non-standard + header on brain-dead platforms (like AIX) to get the definition of + fd_set (which is required for the pth_select prototype). + [Ralf S. Engelschall, Stian Seeberg ] + + *) Merged from Pth 1.4a1: + Fixed auto-configuration for ISC and Win32/Cygwin platforms. + [Ralf S. Engelschall, Giwon On ] + + *) Merged from Pth 1.4a1: + Removed -L. from $(LDFLAGS) in Makefile.in, because this + is not required (libtool already takes care of this). + [Ralf S. Engelschall] + + *) Merged from Pth 1.4a1: + Removed the too explicit `-m 644' from the libtool/shtool + installation command for libpth.la and instead use a `umask 022'. + The reason is because some platforms require the shared libraries + to be executable, so we cannot use an explicit mode. But we use the + umask to make sure we don't result in world or group writeable files. + [Ralf S. Engelschall, Daniel Richard G. ] + + *) Merged from Pth 1.4a1: + Use full-path /sbin/sysctl in config.guess on FreeBSD because + not all users have /sbin in their $PATH. + [Jeff Trawick ] + + *) Merged from Pth 1.4a1: + Upgraded to GNU shtool 1.4.9 + [Ralf S. Engelschall] + + Changes between 1.3.2 and 1.3.3 (24-Feb-2000 to 10-Mar-2000) + + *) Under Solaris and --enable-optimize we now also check for the + compiler option -fast which is supported by the Sun vendor compilers. + [Ralf S. Engelschall] + + *) Fixed AC_COMPILER_OPTION macro in aclocal.m4: it wasn't aware of + the fact that running gcc with not supported options just leads to a + warning (but gcc still compiles the test program and exists with a 0 + return value). + [Ralf S. Engelschall] + + *) Fixed semantics of pth_cond_notify() to match POSIX: if one + notifies a condition variable which has still no waiter, the notify + operation is a no-op. Previously the condition signal was remembered + until a waiter arrived. This is now no longer the case. + [Ralf S. Engelschall, Chris Leishman ] + + *) Allow pth_yield() to yield also to if is a + freshly spawned thread, i.e. in state PTH_STATE_NEW instead of + PTH_STATE_READY, directly after a pth_spawn. This allows one better + control under co-routine programming. + [Ralf S. Engelschall] + + *) Fixed internal pth_pqueue_delete() and pth_pqueue_tail() + functions to pth_pqueue.c for convinience reasons. + [Ralf S. Engelschall] + + *) API CHANGE: Changed pth_time(int,int) to pth_time(long,long) and + pth_timeout(int,int) to pth_timeout(long,long), because pth_time_t + is a struct timeval and this structure is defined always via two + long's and not just int's. + [Ralf S. Engelschall] + + *) Cleaned up source code even more by making sure "signed", + "unsigned" and "const" qualifiers are used correctly and + consistently. + [Ralf S. Engelschall] + + *) Changed default stack size from 32KB to 64KB, because + on Solaris and other platforms where one can set FD_SETSIZE to + values up to 65535 an fd_set is up to 8KB. Pth internally (in + the scheduler in pth_select_ev) has up to three fd_sets (up to + 24KB) on the stack, so a 32KB stack is too risky. Nevertheless + one can still spawn threads with smaller stacks by using + PTH_ATTR_STACK_SIZE, of course. Only the scheduler thread remains + with a 64KB stack, because this thread cannot be configured by the + application. + [Ralf S. Engelschall] + + *) Fixed "make depend": a backslash was missing. + [Edwin Brown ] + + *) Fixed "make install" for pth.m4 and the situation where + one compiles from a different sub-directory. + [Raphael Bossek ] + + Changes between 1.3.1 and 1.3.2 (20-Feb-2000 to 24-Feb-2000) + + *) Do no longer use -woff in CFLAGS for IRIX 6.5.2 and above. + [Edwin Brown , Ralf S. Engelschall] + + *) Replaced ``while (1)'' constructs with ``for (;;)'' because some + compilers like this more and do not warn about constant expressions. + [Ralf S. Engelschall] + + *) Added hint to pth.pod that ``pth_join(, NULL)'' is allowed. + [Ralf S. Engelschall] + + *) Cancel and join the ticker thread explicitly in test_select.c + [Edwin Brown , Ralf S. Engelschall] + + *) Removed unnecessary code in pth_event.c + [Edwin Brown , Ralf S. Engelschall] + + *) Add special namespace workarounds to pthread.h.in for HPUX + platforms where the pthread_kill() prototypes conflict without this. + [M. Lavasani , Ralf S. Engelschall] + + Changes between 1.3.0 and 1.3.1 (19-Feb-2000 to 20-Feb-2000) + + *) Added HISTORY document where we now write down the evolution + and release dates of Pth to have a concise history reference. + [Ralf S. Engelschall] + + *) Added USERS document where we now collect references to + software packages utilizing GNU Pth. + [Ralf S. Engelschall] + + *) Fixed a subtle typo in pth.pod about thread-safe functions + and finished documentation of pth_attr_set/pth_attr_get functions. + [James Robinson , Jeremie ] + + Changes between 1.3b3 and 1.3.0 (13-Feb-2000 to 19-Feb-2000) + + *) Polished the various document files. + [Ralf S. Engelschall] + + *) Use -w in $CFLAGS also on UnixWare 2.1, because its cc + complains about "not reached" situations because of our macros. + [Ralf S. Engelschall] + + *) Replaced "NOT REACHED" with "NOTREACHED" in comments + to be more correct for lint(1). + [Ralf S. Engelschall] + + *) Updated config.param and fixed its parsing procedure. + [Ralf S. Engelschall] + + *) Fixed a few typos in pth.pod and adjusted example program + to make sure it doesn't segfault accidently for the users. + [Tim Harris , Raphael Bossek + , Ralf S. Engelschall] + + Changes between 1.3b2 and 1.3b3 (28-Jan-2000 to 13-Feb-2000) + + *) Fixed PTH_EVENT_FUNC handling (it was not polled really + in regular intervals if there were no other FUNC events which + helped) by extending it with an interval time argument. This way + a PTH_EVENT_FUNC event is likewise a PTH_EVENT_TIME event which + calls the check function after elapsing and resets itself again if + it failed. + [Ralf S. Engelschall] + + *) Removed PTH_EVENT_PID because the waiting on a process id was not + working as expected (the polling was not done in intervals) and this + type of event doesn't really fit very well into the multi-threading + environment of Pth (where the events should be thread-related and not + process-related). So instead of fixing the pid waiting event handling + through some unclean workarounds or kludges (it cannot be done very + different), it was decided to kick it out at all. + [Ralf S. Engelschall] + + *) Make sure pth_connect[_ev]() doesn't block by internally + switching to non-blocking mode temporarily if necessary. + [Chris Leishman , Ralf S. Engelschall] + + *) Fix pthread_cond_timedwait by making it more POSIX compliant: + return ETIMEDOUT instead of 0 if the timeout occurred. + [Emanuele Fornara , Ralf S. Engelschall] + + Changes between 1.3b1 and 1.3b2 (26-Jan-2000 to 28-Jan-2000) + + *) Let "make striptease" be aware of $TMPDIR and remove temporary + directory from this dir, too. + [Ralf S. Engelschall] + + *) Again cleaned up and enhanced the manual page pth.pod. + [Ralf S. Engelschall] + + *) Added a few more errno_shield { ... } sections to prevent + the destruction of errno values on error returns. + [Ralf S. Engelschall] + + *) Added more complete Linux support for --enable-syscall-hard by + using SYS_socketcall+SOCKOP_{accept,connect} if + SYS_{accept,connect} doesn't exist. + [Ralf S. Engelschall] + + *) Added pth_suspend() and pth_resume together with an additional + SUSPENDED queue. This can be used to temporarily park threads in + order to move them out of the schedulers scope. + [Ralf S. Engelschall] + + Changes between 1.3a5 and 1.3b1 (15-Jan-2000 to 26-Jan-2000) + + *) Completely cleaned up the manual page. + [Eric Hanchrow ] + + *) Use SYS__newselect instead of SYS_select under Linux and + --enable-syscall-hard because SYS_select is a dummy stub which + always just returns -1 and errno = EFAULT. + [Artem Gr , Ralf S. Engelschall] + + Changes between 1.3a4 and 1.3a5 (08-Jan-2000 to 15-Jan-2000) + + *) Updated HACKING document. + [Ralf S. Engelschall] + + *) Removed '+DAportable' from HPUX flags to avoid problems. + [M. Lavasani ] + + *) Added a workround in Makefile.in (replaced "rm -r" with + "rm" + "rmdir") for brain-dead AmigaOS. + [Kriton Kyrimis ] + + *) Fixed example in Pth manual page: peer_len wasn't initialized. + [Sami Niemi , Ralf S. Engelschall] + + *) Fixed cleanup handling in test_sig.c. + [Ralf S. Engelschall] + + *) Fixed memory leaks in some test programs. + [Ralf S. Engelschall] + + Changes between 1.3a3 and 1.3a4 (08-Jan-2000 to 08-Jan-2000) + + *) Translated The Open Group's SUSv2 Threading HTML documentation + into POD format to form an appendix for pthread.pod. This is for + convinience reasons when programming with the Pthread API of GNU Pth. + [Ralf S. Engelschall] + + *) Fixed introduced debugging with "==== THREAD CONTEXT SWITCH ====" + lines. They were printed always. + [Ralf S. Engelschall] + + Changes between 1.3a2 and 1.3a3 (30-Dec-1999 to 08-Jan-2000) + + *) Added a PTH_CTRL_DUMPSTATE to pth_ctrl() which helps in debugging. + a pth_ctrl(PTH_CTRL_DUMPSTATE, stderr) for instance writes out a summary + page of the internal Pth library state to stderr. This is intended for + debugging purposes only, of course. + [Ralf S. Engelschall, Lubos Lunak ] + + *) Fixed destructor for statically initialized events which failed + under asynchronous cancellation if those events were merged + together at the time of cancellation. + [Igor A. Minyukoff, Ralf S. Engelschall] + + *) Updated the INSTALL document. + [Ralf S. Engelschall] + + *) Fixed a memory leak in pth_kill(): the TCBs (plus one + stack) of the main and scheduler thread were not freed. + [Pete , Ralf S. Engelschall] + + *) Added developer support for compiling and linking against the + Dmalloc library (for debugging memory allocation) through the + --with-dmalloc[=DIR] Autoconf option. + [Ralf S. Engelschall] + + *) Fixed pth_compat.c: the #define for strerror was buggy. + [Ralf S. Engelschall] + + Changes between 1.3a1 and 1.3a2 (09-Nov-1999 to 30-Dec-1999) + + *) Added first cut of experimental Win32 support through Cygwin B20.1. + [Ralf S. Engelschall, Schizoid ] + + *) Fixed autoheader step by using AC_CHECK_HEADERS() instead of + AC_CHECK_HEADER() because Autoconf's autoheader.m4 isn't aware of + AC_CHECK_HEADER(). + [Ralf S. Engelschall] + + *) Adjusted all copyright messages to include the forthcoming + new year 2000, too. + [Ralf S. Engelschall] + + *) Fixed $DIFS in pth-config.in and pthread-config.in + (the tab was lost) and cleaned up pth-config.in a little bit. + [Ralf S. Engelschall] + + *) Upgraded from GNU libtool 1.3.3 to 1.3.4 + and from GNU shtool 1.4.6 to 1.4.7. + [Ralf S. Engelschall] + + *) Fixed cleanup handling for main thread. Now pth_kill() + and pth_exit() in the main thread work as expected. + [Ralf S. Engelschall, Anton Umnikov ] + + *) Fixed Autoconf --host option. + [Ralf S. Engelschall, Kent Overstreet ] + + *) Fixed pth_mctx.c by making sure ss_base is mapped to ss_sp + only if sigaltstack(2) is used for the stack trick. + [Kriton Kyrimis ] + + *) Fixed return code semantics for error situation in both + pth_write(3) and pth_writev(3). + [Rob Quinn , Ralf S. Engelschall] + + *) Stripped trailing whitespaces from all source files. + [Ralf S. Engelschall] + + Changes between 1.2.0 and 1.3a1 (31-Oct-1999 to 09-Nov-1999) + + *) Changed AC_CHECK_STRUCTATTR macro from a too weak AC_TRY_EGREP to a + AC_TRY_LINK based approach to make sure the ss_sp/ss_base checks do not + fail on platforms where sys/signal.h contains both sigstack and + sigaltstack defines. + [Ralf S. Engelschall] + + *) Added a large "BUILD ENVIRONMENT" section to pth.pod which describes + three ways to establish build environments for Pth based packages. + [Ralf S. Engelschall] + + *) Updated the pth-config.pod and pthread-config.pod for + missing option entries. + [Ralf S. Engelschall] + + *) Added --datadir and --acdir options to pth-config. Especially + --acdir can be used in conjunction with Autoconf's aclocal program to + retrieve the AC_CHECK_PTH macro, e.g. aclocal --output- + --acdir=`pth-config --acdir` prints the macro definition to stdout. + [Ralf S. Engelschall] + + *) Added a new, very flexible and robust pth.m4 Autoconf macro file which + is installed under $datadir/aclocal/ and can be used by third-party + Autoconf scripts to locate GNU Pth. Syntax is: + AC_CHECK_PTH([MIN-VERSION [,DEFAULT-WITH-PTH [,DEFAULT-WITH-PTH-TEST + [,EXTEND-VARS [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]]]]). + [Ralf S. Engelschall, Markus Fischer ] + + *) Added PTH_VERSION_{STR,HEX} to pth.h + [Ralf S. Engelschall] + + *) Fixed AC_CHECK_EXTLIB macro. + [Ralf S. Engelschall] + + *) Added a new developer target `make striptease' which uses the + new striptease.{pl,mk} files to strip down the Pth source tree to a + minimum (approx. 1/3 of size). The generated striptease.dir/ area can be + then imported into third-party source trees and there blows up the stuff + only as minimal as possible. + [Ralf S. Engelschall] + + *) Cleaned up copyright messages in source files. + [Ralf S. Engelschall] + + *) Rewritten the Linux guessing part in config.guess to + create more useful GNU platform triples for Linux flavors. + [Ralf S. Engelschall] + + _ ____ + / | |___ \ + | | __) | + | |_ / __/ + __|_(_)_____|___________________________________________________________ + + Changes between 1.2.2 and 1.2.3 (08-Jan-2000 to 04-Feb-2000) + + *) Backport from Pth 1.3b3: + Fix pthread_cond_timedwait by making it more POSIX compliant: + return ETIMEDOUT instead of 0 if the timeout occurred. + [Emanuele Fornara , Ralf S. Engelschall] + + *) Backport from Pth 1.3b2: + Added more complete Linux support for --enable-syscall-hard by + using SYS_socketcall+SOCKOP_{accept,connect} if + SYS_{accept,connect} doesn't exist. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3b2: + Added a few more errno_shield { ... } sections to prevent + the destruction of errno values on error returns. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3b1: + Use SYS__newselect instead of SYS_select under Linux and + --enable-syscall-hard because SYS_select is a dummy stub which + always just returns -1 and errno = EFAULT. + [Artem Gr , Ralf S. Engelschall] + + *) Backport from Pth 1.3a5: + Removed '+DAportable' from HPUX flags to avoid problems. + [M. Lavasani ] + + *) Backport from Pth 1.3a5: + Added a workround in Makefile.in (replaced "rm -r" with + "rm" + "rmdir") for brain-dead AmigaOS. + [Kriton Kyrimis ] + + *) Backport from Pth 1.3a5: + Fixed example in Pth manual page: peer_len wasn't initialized. + [Sami Niemi , Ralf S. Engelschall] + + *) Backport from Pth 1.3a5: + Fixed memory leaks in some test programs. + [Ralf S. Engelschall] + + Changes between 1.2.1 and 1.2.2 (14-Nov-1999 to 08-Jan-2000) + + *) Backport from Pth 1.3a3: + Updated the INSTALL document. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3a3: + Fixed a memory leak in pth_kill(): the TCBs (plus one + stack) of the main and scheduler thread were not freed. + [Pete , Ralf S. Engelschall] + + *) Backport from Pth 1.3a3: + Fixed pth_compat.c: the #define for strerror was buggy. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3a3: + Fixed destructor for statically initialized events which failed + under asynchronous cancellation if those events were merged + together at the time of cancellation. + [Igor A. Minyukoff, Ralf S. Engelschall] + + *) Backport from Pth 1.3a2: + Upgraded from GNU libtool 1.3.3 to 1.3.4 + and from GNU shtool 1.4.6 to 1.4.7. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3a2: + Fixed pth_mctx.c by making sure ss_base is mapped to ss_sp + only if sigaltstack(2) is used for the stack trick. + [Kriton Kyrimis ] + + Changes between 1.2.0 and 1.2.1 (31-Oct-1999 to 14-Nov-1999) + + *) Backport from Pth 1.3a2: + Fixed return code semantics for error situation in both + pth_write(3) and pth_writev(3). + [Rob Quinn , Ralf S. Engelschall] + + *) Backport from Pth 1.3a1: + Changed AC_CHECK_STRUCTATTR macro from a too weak AC_TRY_EGREP to a + AC_TRY_LINK based approach to make sure the ss_sp/ss_base checks do not + fail on platforms where sys/signal.h contains both sigstack and + sigaltstack defines. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3a1: + Fixed AC_CHECK_EXTLIB macro. + [Ralf S. Engelschall] + + *) Backport from Pth 1.3a1: + Cleaned up copyright messages in source files. + [Ralf S. Engelschall] + + Changes between 1.2b8 and 1.2.0 (26-Oct-1999 to 31-Oct-1999) + + *) Finally tested the package on all major Unix platforms to which + I've direct access (see PORTING document for details). + [Ralf S. Engelschall] + + *) Fixed a few remaining typos in pth.pod; adjusted README file for + release and included ANNOUNCE document in source tree. + [Ralf S. Engelschall] + + *) Fixed special Autoconf detections for UnixWare 2.x platform. + [Ralf S. Engelschall] + + *) Fixed special Autoconf detections for Linux platforms. + [Ralf S. Engelschall] + + *) Updated INSTALL document. + [Ralf S. Engelschall] + + *) Added -w option to CFLAGS under HP-UX with CC. + [Ralf S. Engelschall] + + Changes between 1.2b7 and 1.2b8 (22-Oct-1999 to 26-Oct-1999) + + *) Fixed Pthread compilation under NetBSD 1.4 and Solaris. The pth.h + header has to skip the fallbacks (and not the pthread.h header) when + compiling pthread.c. This subtle difference is important because + ordering is important for correct namespace hiding. + [Ralf S. Engelschall, John A. Maier ] + + *) Greatly enhanced AC_CHECK_ARGTYPE macro to support more + vendor headers and their syntax. + [Ralf S. Engelschall] + + *) Added two new Autoconf options: --enable-maintainer for enabling + maintainer targets (now the x.pod -> x.N translation is disabled per + default and is enabled with this option only) and --enable-tests which + is on per default and can be used (as --disable-tests) to disable the + building of the test programs. + [Ralf S. Engelschall] + + *) Fixed autoheader processing with a new acheader.m4 file. + [Ralf S. Engelschall] + + *) Stripped down shtool script to 7 of 17 ingredients to reduce source + tree by approx. 40KB. + [Ralf S. Engelschall] + + *) Updated acconfig.h: HAVE_NFDS_T was missing. + [Ralf S. Engelschall] + + *) Fixed `make dist': CVS temporary files (.#xx) were included + into the distribution tarball. + [Ralf S. Engelschall] + + Changes between 1.2b6 and 1.2b7 (28-Sep-1999 to 22-Oct-1999) + + *) Add the .gdbinit file also to the distribution tarball. + [Ralf S. Engelschall] + + *) Re-acquire the mutex corresponding to a condition variable when + pth_cond_await() is cancelled, in order to restore the condition + variable semantics. + [Lubos Lunak ] + + *) Fixed cancellation point handling. + [Lubos Lunak ] + + *) Added support for poll(2)'s POSIX nfds_t argument type. + [Ralf S. Engelschall] + + *) Fixed AC_CHECK_ARGTYPE: it now handles wrapped lines, too. + [Ralf S. Engelschall] + + *) Fixed regex in aclocal.m4: tabs were expanded to spaced. + [Ralf S. Engelschall] + + *) Fixed a casting problem related to `void *' in pth_high.c + which g++ 2.95.1 hated. + [Ralf S. Engelschall] + + *) Replaced Autoconf AC_CHECK_FUNCS macro with an own local copy named + AC_CHECK_FUNCTIONS which _always_ uses ``extern "C"'' if __cplusplus is + defined. This way one can configure Pth even if $CC is a C++ compiler. + [Ralf S. Engelschall] + + *) Updated rse-pmt.ps document. + [Ralf S. Engelschall] + + *) Fixed a few typos in the manual page. + [Ralf S. Engelschall] + + *) Fixed aclocal.m4: CFXXLAGS -> CXXFLAGS ;) + [Alexandre Oliva ] + + Changes between 1.2b5 and 1.2b6 (21-Sep-1999 to 28-Sep-1999) + + *) Added platform support for GNU/Linux kernel 2.2 / glibc 2.1 + for both Alpha and Intel platforms via sjlj/ssjlj/sas. + (tested with both RedHat 6.0 and SuSE 6.1) + [Ralf S. Engelschall] + + *) Added platform support for Tru64/OSF1 4.x and 5.0. + [Ralf S. Engelschall] + + *) Added --prefix, --bindir, --libdir, --includedir and --mandir + options to pth-config and pthread-config. Mainly for convinience + and consistency reasons. + [Ralf S. Engelschall] + + *) Avoid compiler complains in pth_mctx.c for assigning a `volatile + sigset_t'. Instead use a plain memcpy() with sizeof(sigset_t). + This now makes also IRIX' 6.5 cc happy. + [Ralf S. Engelschall] + + *) Fixed the Autoconf AC_CHECK_MCSC check which tests whether + SVR4/SUSv2 makecontext(2), swapcontext(2) and friends can be used for + user-space context switching. It was broken because the uc_link and + uc_stack structure attributes were not initialized correctly. + [Ralf S. Engelschall, Ben Harris ] + + *) Updated dependencies in Makefile.in. + [Ralf S. Engelschall] + + *) Mention the new pth-users@gnu.org mailing list in SUPPORT + and added hint to Makefile.in. + [Ralf S. Engelschall] + + Changes between 1.2b4 and 1.2b5 (17-Sep-1999 to 21-Sep-1999) + + *) Added new Autoconf macro AC_COMPILER_OPTION which is now + used to check whether -pipe, -ggdb3 and -W really work + before they are implicitly used. + [Ralf S. Engelschall, Alexandre Oliva ] + + *) Make sure pthread.c compiles even if the platforms lacks `struct + timespec'. The pthread_cond_timedwait() function will then still be + unuseable by the application, of course. But that's the intended + behavour, because the Pthread API cannot be changed at this point. + [Michele Satriani , Ralf S. Engelschall] + + *) Document it more clearly that PTH_ATTR_DEFAULT is _not_ the values an + pth_attr_init() creates. It means that priority, joinability and + cancelstate are _inherited_. + [Eric Newton ] + + Changes between 1.2b3 and 1.2b4 (17-Sep-1999 to 17-Sep-1999) + + *) Fixed test_httpd.c: highest port is 65535 and not 65553 ;) + [Alex Fiori ] + + *) Fix Makefile.in: $(S)shtool -> $(srcdir)shtool + [Ben Harris , Ralf S. Engelschall] + + *) Make Rhapsody happy with pth_errno.c by statically initializing + the contained variables. + [Ben Harris , Ralf S. Engelschall] + + Changes between 1.2b2 and 1.2b3 (04-Sep-1999 to 17-Sep-1999) + + *) Added first cut of support for building Pth outside it's source tree. + [Ben Harris , Ralf S. Engelschall] + + *) Updated pth.pod for new socklen_t usage and updated NEWS file. + [Ralf S. Engelschall] + + *) Officially switched from ``GNU Library General License v2.0'' + to successor license: ``GNU Lesser General License v2.1''. + [Ralf S. Engelschall] + + *) Enhanced ss_sp to ss_base mapping: There is now Autoconf + support for the mapping decision. + [Ralf S. Engelschall, Ben Harris ] + + *) Add `PTHREAD' also to defines for namespace protection. + [Hans v. Sommerfeld ] + + *) Made the temporary errno saving more elegant with a new + `errno_shield { .... }' construct. + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.4.6 + [Ralf S. Engelschall] + + Changes between 1.2b1 and 1.2b2 (02-Sep-1999 to 04-Sep-1999) + + *) Ported Pth to another esoteric, anchient and brain-dead + platform which needs jmp_buf fiddling: Interactive Unix (ISC) 4.0. + [Ralf S. Engelschall, Brandon Reynolds ] + + *) Make sys/resource.h an optional header. + [Ralf S. Engelschall] + + *) Added CPPFLAGS to Makefile.in and configure.in + [Ralf S. Engelschall] + + Changes between 1.1.4 and 1.2b1 (30-Aug-1999 to 02-Sep-1999) + + *) Added TESTS document which shows success stories with + Apache, MySQL, Perl, Python, OpenLDAP, pident, etc. + [Ralf S. Engelschall] + + *) Enhanced pth-config/pthread-config scripts: first they + are now concatenating the output of the options into a single + string and print this at the end once. This way one can use things + like LIBS="`pthread-config --ldflags --libs`" without getting an + intermediate newline which causes trouble in various packages. + Second per default only pth-specific CFLAGS/LDFLAGS/LIBS are + printed. If one wants also additional flags one has used while + building Pth one now can add the --all option. This is to avoid + conflicts between Pth flags and flags of the application. + [Ralf S. Engelschall] + + *) Added -w to CFLAGS for Solaris if $CC is not GCC to avoid the + warnings about "end of loop not reached" because of our + ``do { ...return;... } while(0)'' macros. + [Ralf S. Engelschall] + + *) Fixed two bugs in internal pth_pqueue_delete() and one in + pth_pqueue_insert(): it accidently also adjusted the priority + queue top element if one deleted the last element of the queue and it + calculated the priority of the following element incorrectly. + [Jens Andersen , Ralf S. Engelschall] + + *) Optimized the signal mask handling: The application is now required to + use pth_sigmask(3) and no longer can use sigprocmask(2) directly + (as it's already the case for Pthreads where POSIX states that the + behaviour of sigprocmask(2) is not defined in a MT application). + The side-effect of this consistencency restriction is that + internally the machine context switching no longer has to remember + the signal mask on _every_ context switch. It's now sufficient + that pth_sigmask(3) sets the mask to allow the scheduler to + calculate its own mask. The result is a faster and more clean + thread dispatching. Additionally a soft and hard syscall mapping + for sigprocmask(2) was added, of course. + [Ralf S. Engelschall] + + *) Added support for socklen_t to both avoid warnings under + some platforms and to avoid problems on 64 bit machines. + [Ralf S. Engelschall] + + *) Added UnixWare7 support to config.guess + [Ralf S. Engelschall] + + *) Added config.param facility. + [Ralf S. Engelschall] + + *) Cleaned up bootstrap stuff from configure.in and moved it to aclocal.m4. + [Ralf S. Engelschall] + + *) Fixed autoconf's `--silent' flag: it wasn't passed to ltconfig.sh + [Ralf S. Engelschall] + + *) Rewritten the "make test" message and refreshed the PORTING file to + start with a new format which now includes also the machine context and + stack growth direction. + [Ralf S. Engelschall] + + *) Enhanced the interactive (not --enable-batch) mode: The Makefile now + displays real hints what to do as the next step. All messages can + be disabled via --enable-batch, of course. + [Ralf S. Engelschall] + + *) Fixed aclocal.m4: Tabs were lost by accident. + [Ralf S. Engelschall] + + *) Fixed a type warning in pth_debug.c: pid_t vs. int + [Ralf S. Engelschall] + + _ _ + / | / | + | | | | + | |_| | + __|_(_)_|_______________________________________________________________ + + Changes between 1.1.5 and 1.1.6 (02-Sep-1999 to 28-Sep-1999) + + *) Backport from Pth 1.2b6: + Fixed the Autoconf AC_CHECK_MCSC check which tests whether + SVR4/SUSv2 makecontext(2), swapcontext(2) and friends can be used for + user-space context switching. It was broken because the uc_link and + uc_stack structure attributes were not initialized correctly. + [Ralf S. Engelschall, Ben Harris ] + + *) Backport from Pth 1.2b5: + Document it more clearly that PTH_ATTR_DEFAULT is _not_ the values an + pth_attr_init() creates. It means that priority, joinability and + cancelstate are _inherited_. + [Eric Newton ] + + *) Backport from Pth 1.2b4: + Fixed test_httpd.c: highest port is 65535 and not 65553 ;) + [Alex Fiori ] + + *) Backport from Pth 1.2b4: + Make Rhapsody happy with pth_errno.c by statically initializing + the contained variables. + [Ben Harris , Ralf S. Engelschall] + + *) Backport from Pth 1.2b3: + Add `PTHREAD' also to defines for namespace protection. + [Hans v. Sommerfeld ] + + *) Upgraded to GNU shtool 1.4.6 + [Ralf S. Engelschall] + + Changes between 1.1.4 and 1.1.5 (30-Aug-1999 to 02-Sep-1999) + + *) Backport from Pth 1.2b1: + Enhanced pth-config/pthread-config scripts: first they + are now concatenating the output of the options into a single + string and print this at the end once. This way one can use things + like LIBS="`pthread-config --ldflags --libs`" without getting an + intermediate newline which causes trouble in various packages. + Second per default only pth-specific CFLAGS/LDFLAGS/LIBS are + printed. If one wants also additional flags one has used while + building Pth one now can add the --all option. This is to avoid + conflicts between Pth flags and flags of the application. + [Ralf S. Engelschall] + + *) Backport from Pth 1.2b1: + Fixed two bugs in internal pth_pqueue_delete() and one in + pth_pqueue_insert(): it accidently also adjusted the priority + queue top element if one deleted the last element of the queue and it + calculated the priority of the following element incorrectly. + [Jens Andersen , Ralf S. Engelschall] + + *) Backport from Pth 1.2b1: + Added -w to CFLAGS for Solaris if $CC is not GCC to avoid the + warnings about "end of loop not reached" because of our + ``do { ...return;... } while(0)'' macros. + [Ralf S. Engelschall] + + *) Backport from Pth 1.2b1: + Fixed autoconf's `--silent' flag: it wasn't passed to ltconfig.sh + [Ralf S. Engelschall] + + *) Backport from Pth 1.2b1: + Fixed aclocal.m4: Tabs were lost by accident. + [Ralf S. Engelschall] + + *) Backport from Pth 1.2b1: + Fixed a type warning in pth_debug.c: pid_t vs. int + [Ralf S. Engelschall] + + Changes between 1.1.3 and 1.1.4 (27-Aug-1999 to 30-Aug-1999) + + *) Changed internal handling of spawned threads: they are now really + inserted to the top of the priority queue to make sure a thread is + guarrantied to be dispatched next when one calls pth_yield(NULL) + directly after a pth_spawn(). This is especially interesting for + programming with the co-routine paradigm where it allows one to better + control the startup of a co-routine. + [Ralf S. Engelschall, Jens Andersen ] + + *) Fixed pthread_cancel(): a switch statement was incorrect (three + breaks were missing to stop falling through). + [Jens Andersen ] + + *) Change internal `_pthread' prefix to `__pthread'. + [Ralf S. Engelschall] + + *) Enhanced backward compatibility stuff for Pthread draft 4 (DCE Threads) + in pthread.h.in: When _POSIX_BACKCOMPAT is defined before the pthread.h + header is included one now gets a lot more backward compatibility + mappings. + [Ralf S. Engelschall] + + *) Optimize internal processing by inlining various small functions from + pth_ring.c, pth_pqueue.c and pth_sched.c which are called a lot. + [Ralf S. Engelschall] + + *) Optimized readline() in test_common.c + [Ralf S. Engelschall] + + *) Added specific support for Linux/glibc/mc68000 to pth_mctx.c + [Roman Hodek ] + + *) Updated INSTALL document for --enable-optimize. + [Ralf S. Engelschall] + + Changes between 1.1.2 and 1.1.3 (23-Aug-1999 to 27-Aug-1999) + + *) Enhanced test program of AC_CHECK_STACKGROWTH in aclocal.m4 to + make sure the test variables are not optimized away by the + compiler and this way lead to incorrect check results. + [Martin Kraemer , Ralf S. Engelschall] + + *) Fixed default stack size: was 32*16384 (=512KB) instead + of the intended 32*1024 (=32KB). + [Ralf S. Engelschall] + + *) Added --enable-optimize flag to configure with selected + standard optimization flags of GCC. + [Ralf S. Engelschall] + + *) Added SUPPORT file to source tree. + [Ralf S. Engelschall] + + *) Added test_philo, Dijkstra's Five Dining Philosophers ;) + [Ralf S. Engelschall] + + *) Add "auto" qualifier to PTH_STACKGROWTH test program + to make sure the variables are placed into the stack. + [Ralf S. Engelschall] + + *) Use predetermined $PLATFORM of configure also in Makefile + [Ralf S. Engelschall] + + Changes between 1.1.1 and 1.1.2 (21-Aug-1999 to 23-Aug-1999) + + *) Fixed Makefile.in: pth_acdef.h and pth_acmac.h were not removed on + "distclean" and this way they were accidently distributed. + [Ralf S. Engelschall] + + *) Changed return type of pth_yield() from `void' to `int' to + be able to return an error FALSE/EINVAL in case the `tid' + argument specified an invalid or still not ready thread. + [Kurt D. Zeilenga , Ralf S. Engelschall] + + *) Fixed description of pth_yield() in pth.pod. + [Kurt D. Zeilenga , Ralf S. Engelschall] + + Changes between 1.1.0 and 1.1.1 (19-Aug-1999 to 21-Aug-1999) + + *) Changed pthread_yield_np() from `void' return type to `int' to allow the + `#define sched_yield pthread_yield_np' work as expected, because + sched_yield has `int' return type per SUSv2. + [Kurt D. Zeilenga , Ralf S. Engelschall] + + *) Fixed problems related to pthread_exit() and pth_exit(): The + PTH_EVENT_FUNC internally was used incorrectly by pth_exit() and the + implicit initialization was forgotten in pthread_exit(). + [Kurt D. Zeilenga , Ralf S. Engelschall] + + *) Added consistency check for `timeout' attribute of pth_poll + and various other EINVAL related checks to pth_event.c. + [Ralf S. Engelschall] + + *) Added consistency check for `abstime' attribute of + pthread_cond_timedwait(). + [Ralf S. Engelschall] + + Changes between 1.1b7 and 1.1.0 (18-Aug-1999 to 19-Aug-1999) + + *) Disable vendor typedefs in pthread.h.in because + it caused problems under Solaris. + [Ralf S. Engelschall] + + *) Cleaned up the sources a little bit more. + [Ralf S. Engelschall] + + *) Updated rse-pmt.ps to v0.9.15 + [Ralf S. Engelschall] + + Changes between 1.1b6 and 1.1b7 (18-Aug-1999 to 18-Aug-1999) + + *) Added test for nested thread operation to test_std.c + [Ralf S. Engelschall] + + *) Updated rse-pmt.ps to talk about the sigsetjmp(3) problems. + [Ralf S. Engelschall] + + *) Enhanced the heart of Pth: pth_mctx_set(). + Instead of the real dispatching functions a plain setjmp(3)/longjmp(3) + pair is used for the trampoline trick in order to avoid problems with + sigjmp_buf-attached signal stacks on platforms where sigsetjmp(3) does + more than it is usuallly expected. This especially fixes `thread spawns + thread' problems under HPUX. + [Ralf S. Engelschall, Aaron Metzger ] + + Changes between 1.1b5 and 1.1b6 (17-Aug-1999 to 18-Aug-1999) + + *) Fixed return value of pth_write/pth_read. + [Eric Newton , Ralf S. Engelschall] + + *) Fixed example in manual page (pth.pod): pth_load() + is now pth_ctrl(PTH_CTRL_GETAVLOAD, ...) + [Eric Newton ] + + *) Fixed warning in pth_high.c related to implicit casting. + [Ralf S. Engelschall] + + *) Added BS2000 support to config.guess/config.sub. + [Martin Kraemer] + + *) Fixed a sigaltstack() call in pth_mctx.c: the return code + was checked incorrectly. + [Ralf S. Engelschall] + + *) Updated rse-pmt.ps + [Ralf S. Engelschall, Eric Newton ] + + *) Fixed a nasty bug in the thread stack allocation: A stack was also + allocated for the main thread, but not used. The problem was that an + allocated stack has a guardian and this way was checked each time and + could lead to a bogus STACK OVERFLOW for the "main" thread. + [Ralf S. Engelschall, Martin Kraemer] + + Changes between 1.1b4 and 1.1b5 (13-Aug-1999 to 17-Aug-1999) + + *) Added draft of forthcoming paper ``Portable Multithreading - The Signal + Stack Trick Of User-Space Thread Creation'' to source tree under + rse-pmt.ps. Hackers are encouraged to read this if they want to + understand Pth's internals. + [Ralf S. Engelschall] + + *) Source cleanups: added `extern' qualifier to function prototypes in + pth.h.in and pthread.h.in; make compilation silent with both gcc 2.95.1 C + and C++ frontends by fixing implicit type conversion situations, etc. + [Ralf S. Engelschall] + + *) Return EBUSY instead of EAGAIN for pth_mutex_acquire() when the "try" + argument is TRUE. This fixes especially the POSIX semantics of + pthread_mutex_trylock(). + [Ralf S. Engelschall] + + *) Added pth_compat.c with strerror(3) replacement for SunOS. + [Ralf S. Engelschall] + + *) Fixed pthread_{mutex,rwlock,cond}_destroy() functions. + [Ralf S. Engelschall] + + *) Added support for `configure '. + [Ralf S. Engelschall, Martin Kraemer ] + + Changes between 1.1b3 and 1.1b4 (11-Aug-1999 to 13-Aug-1999) + + *) Fixed blocking semantics of pth_writev(). + [Ralf S. Engelschall] + + *) Fixed a very nasty bug in pth_select(): The write fd_set was passed + twice to the scheduler (once as the write fd_set and once as the + execptional fd_set). This caused problems, because the event loop this + way deleted bits in the write fd_set by accident and the return semantic + was broken. + [Ralf S. Engelschall] + + *) Added fallbacks for UIO_MAXIOV to pth.h and pthread.h + [Ralf S. Engelschall] + + *) Remove locking check in pth_mutex_init() because this would only work + with static vars where ANSI C guarranties an initialization with 0 + bytes. + [Martin Kraemer ] + + *) Fixed pth_write() semantics. + [Ralf S. Engelschall] + + Changes between 1.1b2 and 1.1b3 (10-Aug-1999 to 11-Aug-1999) + + *) Overhauled pthread.h to make it better compile-able also under + platforms where a vendor Pthread library exists. + [Ralf S. Engelschall] + + *) Reordered ingredients of configure.in. + [Ralf S. Engelschall] + + *) Fixed aclocal.m4: -g was incorrectly stripped. + [Ralf S. Engelschall] + + *) Enhance pth_write(): In non-blocking (default) mode it now mimics the + behaviour of write(2) more correctly by iterating until all data is + written or an error occurs. + [Ralf S. Engelschall] + + Changes between 1.1b1 and 1.1b2 (07-Aug-1999 to 10-Aug-1999) + + *) Fixed ring walking inside both public pth_msgport_find() function and + the internal pth_mutex_releaseall() function. + [Laurent Vaucher ] + + Changes between 1.0.4 and 1.1b1 (03-Aug-1999 to 07-Aug-1999) + + *) Fixed test_select.c: a char has to be used for read(2) and not an int. + [Ralf S. Engelschall] + + *) Fixed AC_CHECK_NSIG test and this way PTH_NSIG define. + [Ralf S. Engelschall] + + *) Overhauled pth_mctx.c's internals according to latest algorithm of my + paper ``Portable Multithreading - The Signal Stack Trick For User-Space + Thread Creation''. Especially: sigstack had not restored stack + correctly, the signal mask was not inherited correctly; Linux + signal mask handling was incorrect, etc. + [Ralf S. Engelschall] + + *) Adjusted variables in pth_mctx.c to use `volatile' qualifier. + [Ralf S. Engelschall] + + *) Simplified Makefile.in a little bit by removing $(OBJS) + [Ralf S. Engelschall] + + *) Replaced the run-time stack growth decision for the guardian in + pth_tcb.c with a compile-time decision. + [Ralf S. Engelschall] + + *) Completly rewritten the configure.in part which deals + with the machine context (mctx) implementation: First SVR4/SUSv2 + makecontext(2) and friends are generally preferred. Second, the user + now can override the decisions via --with-mctx-{mth,dsp,stk}. Third, the + pth_mctx.c source was enhanced by using skaddr_xxx() and sksize_xxx() + macros which know through Autoconf checks how a stack has to be setup + correctly for makecontext(2), sigaltstack(2) and sigstack(2). + [Ralf S. Engelschall] + + *) Add support to pth_mctx.c for SVR4/SUSv2 makecontext(2)/swapcontext(2) + and friends. This way Pth now is best prepared to cover forthcoming Unix + flavors, because these are didicated and standadized functions for + user-space context switching. + [Ralf S. Engelschall] + + *) Completely overhauled aclocal.m4 + [Ralf S. Engelschall] + + *) Use GNU config.guess/config.sub instead of GNU shtool guessos + for wider support inside GNU libtool. + [Ralf S. Engelschall] + + *) Replaced switch() over long variables (which aren't covered by + traditional C) with an if-else construct in pth_event.c to be more + portable. + [Ralf S. Engelschall] + + *) Fixed timeout handling in pth_select(). + [Ralf S. Engelschall] + + *) Don't free(2) application-supplied stacks on cleanups. + [Ralf S. Engelschall] + + *) Don't allow an application to change the stack size or address on an + pth_attr_t object when its attached to a thread (see pth_attr_of). + [Ralf S. Engelschall] + + *) Added pth_ext.c for extensional functionality. As a first + cut Sfio support is provided by an additional function pth_sfiodisc. + This functions is always available, but only reasonably useable when Pth + was built with Sfio support (--with-sfio option) and PTH_EXT_SFIO is + then defined by pth.h. It is useful for applications which want to use + the comprehensive Sfio I/O library with the Pth threading library. Then + this function can be used to get an Sfio discipline structure (Sfdisc_t) + which can be pushed onto Sfio streams (Sfio_t) in order to let this + stream use pth_read(3)/pth_write(2) instead of read(2)/write(2). The + benefit is that this way I/O on the Sfio stream does only block the + current thread instead of the whole process. The application has to + free(3) the Sfdisc_t structure when it is no longer needed. + [Ralf S. Engelschall] + + *) Added `barrier' synchronization objects. These provide a way to let a + group of threads wait at a barrier until the last reached the barrier. + It's implemented on top of mutex and condition variable. + [Ralf S. Engelschall] + + *) Replaced a bogus stdio fgetc() in test_select with pth_read(). + [Ralf S. Engelschall] + + *) Fixed internal pth_debug(3): it now preserved errno to make sure there + is no run-time difference in semantics just because of debug messages. + [Ralf S. Engelschall] + + *) Overhauled the filedescriptor handling: + 1. There is no longer a requirement to manually switch a filedescriptor + into non-blocking mode in order to use it. This is automatically done + temporarily inside Pth now. Instead when you now switch a filedescriptor + explicitly into non-blocking mode, pth_read(3) or pth_write(3) will + never block the current thread as it is the expected behaviour for + non-blocking I/O. + 2. pth_nonblocking(3) was replaced by a more convinient pth_fdmode(3) + function which can perform both get and set operations at once. + [Ralf S. Engelschall] + + _ ___ + / | / _ \ + | || | | | + | || |_| | + __|_(_)___/_____________________________________________________________ + + Changes between 1.0.4 and 1.0.5 (03-Aug-1999 to 10-Aug-1999) + + *) Backport from Pth 1.1b2: + Fixed ring walking inside both public pth_msgport_find() function + and the internal pth_mutex_releaseall() function. + [Laurent Vaucher ] + + *) Backport from Pth 1.1b1: + In pth_mctx.c the signal stack was not restored correctly. + [Ralf S. Engelschall] + + *) Backport from Pth 1.1b1: + Fixed test_select.c: a char has to be used for read(2) and not an int. + And replaced a bogus stdio fgetc() in test_select with pth_read(). + [Ralf S. Engelschall] + + *) Backport from Pth 1.1b1: + Fixed AC_CHECK_NSIG test and this way PTH_NSIG define. + [Ralf S. Engelschall] + + *) Backport from Pth 1.1b1: + Fixed timeout handling in pth_select(). + [Ralf S. Engelschall] + + Changes between 1.0.3 and 1.0.4 (30-Jul-1999 to 03-Aug-1999) + + *) Fixed two read/write calls: they didn't use the pth_sc wrapper. + [Ralf S. Engelschall] + + *) Make pth_{read,write}() functions more POSIX compliant by returning 0 + when the nbytes argument is given as 0. And make pth_{readv,writev}() + functions more POSIX compliant by returning -1/EINVAL when the iovcnt + argument is less or equal to 0. + [Ralf S. Engelschall] + + *) Added missing readv/writev wrappers to pthread.c + [Ralf S. Engelschall] + + *) Typo fixes in pth.pod + [Eric Newton ] + + *) Fixed special `--disable-static --enable-shared' situation. + [Felix von Leitner , Ralf S. Engelschall] + + *) Fixed `debug-xx' targets. + [Ralf S. Engelschall] + + Changes between 1.0.2 and 1.0.3 (28-Jul-1999 to 30-Jul-1999) + + *) Fixed inconsistent and wrong API value: PTH_ATTR_NULL existed and was + documented as PTH_ATTR_NONE. But actually the intended and intuitive + value was PTH_ATTR_DEFAULT. !BE CAREFUL: This is an API change and + requires adjustments in Pth applications! + [Ralf S. Engelschall, Eric Newton ] + + *) Make sure pthread.h.in doesn't redefine the poll(2) environment + under built-time because it's already defined by the included pth.h. + [Kriton Kyrimis ] + + *) Add readv/writev environment fallback definitions to pthread.h.in. + [Ralf S. Engelschall] + + *) Support for AmigaOS in pthreads.c: timespec attributes have (correct) + ts_ prefix under AmigaOS and not the (bogus) POSIX tv_ prefix + [Kriton Kyrimis ] + + *) Add `#include ' for struct timespec to pthread.h.in + and removed timespec references in pth.h.in. + [Ralf S. Engelschall] + + *) Fixed documentation for pth_spawn() and pth_wait(). + [Ralf S. Engelschall, Eric Newton ] + + Changes between 1.0.1 and 1.0.2 (22-Jul-1999 to 28-Jul-1999) + + *) Upgraded to GNU shtool 1.4.5. + [Ralf S. Engelschall] + + *) Added `uninstall' target to Makefile + [Ralf S. Engelschall] + + *) Cleanup package to conform to the GNU standards: added AUTHORS document; + renamed CHANGES to ChangeLog and added NEWS document; renamed LICENSE to + COPYING; renamed CREDITS to THANKS; added hint to bug-pth@gnu.org to + pth.pod manual. + [Ralf S. Engelschall] + + *) Fixed HAVE_SIGSTACK alternative in pth_mctx.c + [Jim Jagielski ] + + *) Removed internal "was_blocking" attribute in event structure + because it was never used. + [Ralf S. Engelschall] + + *) Fixed documentation of pth_xxx_init() synchronization functions. + [Ralf S. Engelschall] + + Changes between 1.0.0 and 1.0.1 (16-Jul-1999 to 22-Jul-1999) + + *) Added missing documentation for pth_timeout(). + [Ralf S. Engelschall] + + *) Moved pthread_p{read,write}() to pth_high.c as pth_p{read,write}() + and added syscall wrapper support for it. + [Ralf S. Engelschall] + + *) Added support for readv(2) and writev(2): There are now + four new API functions pth_readv, pth_readv_ev, pth_writev and + pth_writev_ev. Additionally on platforms where no native + readv(2)/writev(2) exists, the struct iovec is faked and the internal + implementation is based on read(2)/write(2). This way the functionality + is available everywhere. Finally, the syscall support was extended to + cover readv and writev now, too. + [Ralf S. Engelschall] + + *) Added support for FNDELAY to pth_nonblocking. + [Ralf S. Engelschall] + + *) Cleaned up pthread.h and pth.h and added extra forward definitions for + struct timeval/timespec to avoid problems on some platforms (like SCO). + [Ralf S. Engelschall] + + *) Added "make check" as an alias for "make test" + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.4.4 and use new `shtool tarball' + [Ralf S. Engelschall] + + Changes between 1.0b8 and 1.0.0 (16-Jul-1999 to 16-Jul-1999) + + *) Fixed scheduler reinitialization. + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.4.4-dev. + [Ralf S. Engelschall] + + *) Cleaned up syscall stuff: usleep() is not longer mapped because it's too + unstandardized, sigwait() is again mapped because it is standardized and + those platforms which fail are broken. + [Ralf S. Engelschall] + + *) Fixed pthread-config.in: -lpth => -lpthread + [Ralf S. Engelschall] + + *) Downgraded required Autoconf version to 2.12 + [Ralf S. Engelschall] + + *) Moved pth_readline[_ev]() from the Pth API into test_common.c because + this function is just a half-way solution (pth_read doesn't use the same + buffer) and when one needs buffered I/O it's better to use a _real_ I/O + library like Sfio, etc. + [Ralf S. Engelschall] + + *) Cleanup to Makefile.in + [Ralf S. Engelschall] + + Changes between 1.0b7 and 1.0b8 (14-Jul-1999 to 16-Jul-1999) + + *) Fixed result handling of stack growth detection. + [Ralf S. Engelschall, Frank Carpenter ] + + *) Added explicit libtool --mode flags in Makefile.in + to avoid compiler guessing problems on esoteric platforms. + [Ralf S. Engelschall] + + *) Fixed broken condition variable handling: the scheduler + incorrectly checked the condition variable flags. + [Ralf S. Engelschall, Andrew Hunter ] + + *) Allow main thread to be joinable to fulfill POSIX. + [Ralf S. Engelschall] + + *) Fixed a nasty bug in the scheduler: the write and exceptional + filedescriptor sets were not passed to the select(): ARGL! + [Ralf S. Engelschall] + + *) Added implicit initialization to pth_syscall.c stuff + and pthread.c stuff. + [Ralf S. Engelschall] + + *) Fixed again static initializations via PTHREAD_XXX_INITIALIZER + [Ralf S. Engelschall] + + *) Fixed again PTHREAD_ONCE_INIT + [Ralf S. Engelschall] + + *) Added PTHREAD_CANCELED to pthread.h. + [Ralf S. Engelschall] + + *) Fixed POSIX pthread_testcancel(): it is defined to have + void return type and not int. + [Ralf S. Engelschall] + + Changes between 1.0b6 and 1.0b7 (14-Jul-1999 to 14-Jul-1999) + + *) Replaced FALSE value for PTHREAD_ONCE_INIT in pthread.h with 0 to + be not dependent on such defines. + [Ralf S. Engelschall, Rick Brownrigg] + + *) Disabled syscall soft mapping for usleep because it causes prototype + conflicts with unistd.h on some platforms due to the fact that usleep(3) + is bad standardized. + [Ralf S. Engelschall, Rick Brownrigg] + + *) Added pthread_cancel() to POSIX emulation. + [Ralf S. Engelschall, Rick Brownrigg] + + *) Fixed poll(2)/poll.h detection in Autoconf. + [Ralf S. Engelschall, Igor A. Minyukoff ] + + Changes between 1.0b5 and 1.0b6 (11-Jul-1999 to 14-Jul-1999) + + *) Fixed pth_attr_ctrl(): it failed with EACCES because + of incorrect comparisons + [Igor A. Minyukoff ] + + *) Replaced PTHREAD_{MUTEX,COND,RWLOCK}_INITIALIZER with an alternative + implementation to allow the assignment to `static' variables, too. + [Ralf S. Engelschall, Rick Brownrigg ] + + Changes between 1.0b4 and 1.0b5 (08-Jul-1999 to 11-Jul-1999) + + *) Fixed pth_waitpid() semantics. + [Ralf S. Engelschall] + + *) Added pth_poll() and pth_poll_ev() with the following trick: it is always + present (independent whether the platform has poll(2) or not), because it + is (AND HAS TO BE) internally based on pth_select(). The poll function + wrapping support was added, too. + [Ralf S. Engelschall] + + *) Moved pth_init() to the top of all test applications. + [Ralf S. Engelschall] + + *) Added direct system call mapping support: --enable-syscall-soft + enables #define's in pth.h and pthread.h which do a soft-mapping of e.g. + read to pth_read. This is _always_ possible. --enable-syscall-hard + enables the exportation of syscall wrappers (e.g. read) by the Pth + library and the calling of the real system calls via syscall(2), hence + this variant is only available when the platform supports syscall(2) + [e.g. yes: *BSD, Linux, Solaris, HP/UX, IRIX, UnixWare; no: AIX, SCO5] + + For the soft variant the whole application sources have to include + pth[read].h and existing libraries (like stdio!) can still block the + whole process, while for the hard variant the application sources do not + all have to include pth[read].h an existing libraries (including stdio!) + magically use Pth's system call wrappers. + [Ralf S. Engelschall] + + *) Speeded up `configure --help' by not creating the header + [Ralf S. Engelschall] + + *) Added pth_select_ev() and pth_select() based on the new PTH_EVENT_SELECT + and the old PTH_EVENT_TIME events which emulate 4.2BSD's select(2), but + suspend only the current thread. Additionally added a select() wrapper to + the POSIX wrapper API. + [Ralf S. Engelschall] + + *) Added PTH_EVENT_SELECT which can be used to suspend the current thread + until an event occured in one of three fd _sets_ similar to select(2) but + without the timeout facility. + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.4.3. This especially fixes + the shared library generation under GNU/Linux now. + [Ralf S. Engelschall] + + *) Added pth_abort() and a corresponding pthread_abort() + for cruel ways to cancel a thread. + [Ralf S. Engelschall] + + *) Fixed POSIX pread()/pwrite(): Their mutex variables have + to be static variables and not local variables. + [Ralf S. Engelschall] + + *) Added #define for POSIX sched_yield() to pthread.h.in + [Ralf S. Engelschall] + + Changes between 1.0b3 and 1.0b4 (07-Jul-1999 to 08-Jul-1999) + + *) Added POSIX pread() and pwrite() [parallel I/O] emulation + functions to pthread.{ch]. + [Ralf S. Engelschall] + + *) Removed double-definition of the fallback types in pthread.h.in. + [Ralf S. Engelschall] + + *) Added pthread_atfork() to pthread.c + [Ralf S. Engelschall] + + *) Added pth_atfork_{push,pop}() functions and moved them together with + pth_fork() to a new pth_fork.c source files. Updated also the + documentation to describe the new at-fork handlers. + [Ralf S. Engelschall] + + *) Write still missing documentation for pth_cleanup_{push,pop}() + [Ralf S. Engelschall] + + *) Fixed again pth_event_concat(): The last attempt was + to inefficient and still had a bug. + [Igor A. Minyukoff , Ralf S. Engelschall] + + *) Cleaned up all name references: The official long name is `GNU Portable + Threads', the official short name is `GNU Pth' and the common prefix is + `pth_' and `PTH_'. + [Ralf S. Engelschall] + + Changes between 1.0b2 and 1.0b3 (04-Jul-1999 to 07-Jul-1999) + + *) Remove a trailing comma inside an enum in pthread.h.in + [Martin Kraemer ] + + *) Added two new API event-related functions which can be used to extract + the contents of existing events: pth_event_typeof() and + pth_event_extract(). + [Ralf S. Engelschall] + + *) Fixed pth_event_concat(): It was broken because it + handled real/non-single-event event rings not correctly. + [Igor A. Minyukoff , Ralf S. Engelschall] + + *) Fixed pth_event_walk(): It was broken for PTH_WALK_NEXT + [Igor A. Minyukoff , Ralf S. Engelschall] + + *) Fixed memory leak in pth_join() + [Igor A. Minyukoff ] + + *) Fixed manual page pthread-config.pod + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.4.1 and GNU libtool 1.3.3 + [Ralf S. Engelschall] + + *) Fixed test_pthread.c: sleep(3) requires unistd.h + [Ralf S. Engelschall, Martin Kraemer ] + + *) Cleaned up --enable-batch/--enable-pthread + [Ralf S. Engelschall] + + Changes between 1.0b1 and 1.0b2 (28-Jun-1999 to 04-Jul-1999) + + *) Upgraded to GNU shtool 1.4.0 + [Ralf S. Engelschall] + + *) Changed return value type of pth_version() from "int" to "long" + to avoid problems with too large numbers. + [Ralf S. Engelschall] + + *) Simplified internal representation of pth_once_t + [Ralf S. Engelschall] + + *) !!ATTENTION!! Renamed _anything_ from the old + coding-name nps/NPS to the new official name pth/PTH. + [Ralf S. Engelschall] + + *) Added the new POSIX.1c pthread emulation library + (pthread* files). It has to be enabled explicitly + via --enable-pthread because it's disabled per default) + [Ralf S. Engelschall] + + *) Enhanced pthread.pod manual page. + [Ralf S. Engelschall] + + Changes between 0.9.21 and 1.0b1 (25-Jun-1999 to 28-Jun-1999) + + *) Added internal pth_util_cpystrn() to pth_util.c + [Ralf S. Engelschall] + + *) removed pth_attr(), pth_priority(), pth_detach() + [Ralf S. Engelschall] + + *) added new pth_attr_*() functions for manipulating pth_attr_t objects; + this is now more flexible because those objects now can be also bound to + threads when retrieved via pth_attr_of(). THIS IS A HEAVY BUT IMPORTANT + API CHANGE! READ THE DOCS AND THE TEST PROGRAMS FOR DETAILS. SORRY, BUT + IS HAS TO BE DONE BEFORE WE ENTER THE STABLE 1.0 VERSIONS. + [Ralf S. Engelschall] + + *) Added --enable-profile and --enable-batch to Autoconf + [Ralf S. Engelschall] + + *) Updated pth.pod to reflect latest changes. + [Ralf S. Engelschall] + + *) Renamed pth_state_* to upper case names. + [Ralf S. Engelschall] + + *) Moved pth_sigmask() to pth_high.c + [Ralf S. Engelschall] + + *) Renamed pth_sigraise() to pth_raise() and added support for + per-thread signal delivery via pth_raise(). + [Ralf S. Engelschall] + + *) Renamed pth.c to pth_lib.c + [Ralf S. Engelschall] + + *) Upgraded to GNU shtool 1.3.1 + [Ralf S. Engelschall] + + *) Added pth_version() function + [Ralf S. Engelschall] + + *) Added a real test Makefile target via new test_std.c + [Ralf S. Engelschall] + + *) Added more references to pth.pod + [Ralf S. Engelschall] + + ___ ___ + / _ \ / _ \ + | | | | (_) | + | |_| |\__, | + ___\___(_) /_/__________________________________________________________ + + Changes between 0.9.20 and 0.9.21 (24-Jun-1999 to 25-Jun-1999) + + *) Upgraded to final shtool 1.3.0 release version + [Ralf S. Engelschall] + + *) Removed all variables names from prototypes to avoid conflicts + [Ralf S. Engelschall] + + *) Removed unnecessary casts for malloc() calls. + [Ralf S. Engelschall] + + *) Added pth_sigraise() function for later implementing pthread_kill() and + currently at least for testing whether a thread still exists in the + system (by sending it a signal 0). + [Ralf S. Engelschall] + + *) Renamed remaining XXX_INITIALIZER to XXX_INIT to be consistent with + other init values. + [Ralf S. Engelschall] + + *) Prefixed all pth_attr_t attributes with "at_" + [Ralf S. Engelschall] + + *) Removed pth_equal(): we're not such crazy than POSIX... + [Ralf S. Engelschall] + + Changes between 0.9.19 and 0.9.20 (21-Jun-1999 to 24-Jun-1999) + + *) Upgraded to latest shtool 1.3.0-dev + [Ralf S. Engelschall] + + *) Changed pth_yield(void) to pth_yield(pth_t) to allow the specification of + a thread which should be favored. This allows the usage of the old + concept of co-routines where a thread/routine switches to a particular + target thread. + [Ralf S. Engelschall] + + *) Added hint about async-safety to pth.pod + [Ralf S. Engelschall] + + *) Added POSIX-style consistency wrapper pth_sigmask() for sigprocmask(). + [Ralf S. Engelschall] + + *) Added try argument to pth_mutex_acquire() to allow us later to + emulate POSIX pthread_mutex_trylock() + [Ralf S. Engelschall] + + *) Moved errno stuff to a new dedicated pth_errno.c source file + [Ralf S. Engelschall] + + *) Changed function signatures to support return codes with errno + [Ralf S. Engelschall] + + *) pth_exit(val) in the main() thread now really just terminated the thread + and not immediately the process, i.e. the thread goes sleeping until all + other threads are gone and then does an exit(val). + [Ralf S. Engelschall] + + Changes between 0.9.18 and 0.9.19 (20-Jun-1999 to 21-Jun-1999) + + *) Added a POSIX style pth_detach() + [Ralf S. Engelschall] + + *) Added pth_sync.c with POSIX style mutual exclusion locks (mutex), + read-write locks (rwlock) and condition variable (cond) support + [Ralf S. Engelschall] + + *) Added a trivial mutex demo to test_misc.c + [Ralf S. Engelschall] + + Changes between 0.9.17 and 0.9.18 (18-Jun-1999 to 20-Jun-1999) + + *) Greatly extended the manual page pth.pod + [Ralf S. Engelschall] + + *) Added inclusion hack to pthread.h.in + [Ralf S. Engelschall] + + *) Added per thread cleanup functions pth_cleanup_{push,pop}() modeled + directly after the POSIX pthread_cleanup_{push,pop}() functions + [Ralf S. Engelschall] + + *) Fixed a memory leak related to pth_key_xxx(). + [Ralf S. Engelschall] + + *) Added internal pth_pqueue_contains() function + [Ralf S. Engelschall] + + *) Added public API function pth_cancel(), pth_cancel_state() and + pth_cancel_point() for thread cancellation support modeled after the + POSIX thread cancellation facility. + [Ralf S. Engelschall] + + *) Removed pthread.* stuff. It will be re-integrated later for Pth 1.1.x + [Ralf S. Engelschall] + + *) Added cancellation flags to pth_attr(). + [Ralf S. Engelschall] + + *) Added cancellation demo support to test_sig.c + [Ralf S. Engelschall] + + Changes between 0.9.16 and 0.9.17 (09-Jun-1999 to 18-Jun-1999) + + *) Removed pthread_p.h + [Ralf S. Engelschall] + + *) Upgraded to latest shtool 1.3.0-dev + [Ralf S. Engelschall] + + *) Added stack overflow detection: a SIGSEGV is created when a + guardian memory address at the bottom of the stack was + overridden. This SIGSEGV can be even catched by the + application. + [Ralf S. Engelschall] + + Changes between 0.9.15 and 0.9.16 (04-Jun-1999 to 09-Jun-1999) + + *) Some Autoconf related cleanups. + [Ralf S. Engelschall] + + *) Added configure --enable-batch for FreeBSD port + [Ralf S. Engelschall] + + *) Removed TODO file + [Ralf S. Engelschall] + + *) Moved sigdelete stuff to new pth_util.c source + [Ralf S. Engelschall] + + *) Added pth_sigwait_ev() + [Ralf S. Engelschall] + + *) Updated pth.pod for recent changes + [Ralf S. Engelschall] + + *) Fixed GNU/Linux libc v5 pth_mctx_set() variant + [Ralf S. Engelschall, Felix von Leitner ] + + Changes between 0.9.14 and 0.9.15 (01-Jun-1999 to 04-Jun-1999) + + *) Upgraded to shtool 1.2.9 + [Ralf S. Engelschall] + + *) Avoid race conditions in emulated sigsetjmp() switching + [Ralf S. Engelschall] + + *) Added test_sig.c + [Ralf S. Engelschall] + + *) Fixed getsockopt() call: errlen wasn't initialized + [Ralf S. Engelschall, Anton Umnikov ] + + *) Allow pth_event_walk() also to use PTH_UNTIL_OCCURRED + to walk to the next/prev. occurred event in a ring + [Ralf S. Engelschall] + + *) Completely overhauled the signal processing in the scheduler + [Ralf S. Engelschall] + + *) Added pth_sigwait() with POSIX semantics + [Ralf S. Engelschall] + + *) Fixed pth_join(): It returns -1 when only one thread is left + [Ralf S. Engelschall] + + *) Autoconf now no longer adds -g for gcc unless --enable-debug + [Ralf S. Engelschall] + + Changes between 0.9.13 and 0.9.14 (01-Jun-1999 to 01-Jun-1999) + + *) Simplified the event construction by removing unnecessary PTH_UNTIL_XX + flags and renaming the remaining ones to PTH_UNTIL_YY_XXX. + [Ralf S. Engelschall] + + *) Renamed PTH_EVENT_IRQ to PTH_EVENT_SIG and implemented it the first time + via sigpending()/sigismember(). + [Ralf S. Engelschall] + + *) Documented the event facility in the manual page + [Ralf S. Engelschall] + + *) Switched TCB's name attribute from "char *" to "char[40]" and copy in the + value when spawning. This allows applications to generate the name + temporarily only. + [Ralf S. Engelschall] + + *) Cleaned up source code at lots of edges... + [Ralf S. Engelschall] + + Changes between 0.9.12 and 0.9.13 (30-May-1999 to 01-Jun-1999) + + *) Cleaned up Makefile.in even more + [Ralf S. Engelschall] + + *) Add stackaddr argument to pth_attr() to allow the application + to specificy a particular stack + [Ralf S. Engelschall] + + *) Added pthread* files which will contain the POSIX.1c threading + ("pthread") API wrapper for PTH. This is still work in progress and not + enabled per default (one has to use --enable-pthread). + [Ralf S. Engelschall] + + *) Added SunSoft's pthread_June95.ps document ("PThreads Summary") + as pthreads.ps + [Ralf S. Engelschall] + + *) Update pth.pod to reflect recent changes. + [Ralf S. Engelschall] + + *) Optimized pth_time_cmp() + [Ralf S. Engelschall] + + *) Added support for per-thread signal masks + [Ralf S. Engelschall] + + *) Made pth_mctx_set() more robust: It now uses sigsuspend for + waiting, correctly blocks signals and restores SIGUSR1 stuff + [Ralf S. Engelschall] + + *) Fixed license messages in sources files + [Ralf S. Engelschall] + + *) Removed const from pth_connect and pth_connect_ev to avoid problems + [Ralf S. Engelschall] + + *) Make sure Autoconf doesn't add -lnsl twice + [Ralf S. Engelschall] + + *) Cleaned up pth_mctx.c even more + [Ralf S. Engelschall] + + Changes between 0.9.11 and 0.9.12 (28-May-1999 to 30-May-1999) + + *) Some fixes to test_httpd.c: init of addrlen, REQ_MAX handling + [Ralf S. Engelschall] + + *) Allow pth_join(NULL) to join any available terminated thread + [Ralf S. Engelschall] + + *) Fixed incorrect pth_event_concat() usages: terminated NULL was missing + [Ralf S. Engelschall] + + *) Added pth_connect, pth_connect_ev and pth_accept_ev functions + [Ralf S. Engelschall] + + *) Removed unnecessary b_extra stuff from pth_read/pth_write + [Ralf S. Engelschall] + + *) Removed "intern" on pth_time(), it's a public API function + [Ralf S. Engelschall] + + *) Added pth_timeout() constructor function + [Ralf S. Engelschall] + + *) Fixed event handling for all pth_xxx_ev() functions + [Ralf S. Engelschall] + + *) Use pth_readline_ev() in test_mp to show how pth_xxx_ev() works + [Ralf S. Engelschall] + + *) Converted pth_nap() and pth_join() to use PTH_MODE_STATIC + [Ralf S. Engelschall] + + *) Fixed event initialization in event rings + [Ralf S. Engelschall] + + *) Kicked out the whole "occurred event ring" stuff because it's not really + necessary (one can walk through a single ring and check for occurred + events easily) and this way two nasty bugs can be fixed and the event + manager simplified a lot. pth_wait() not has only one argument + and this is a read-only one, i.e. only the occured flag is set + in the events in this ring, but the ring is no longer changed. + [Ralf S. Engelschall] + + Changes between 0.9.10 and 0.9.11 (28-May-1999 to 28-May-1999) + + *) Fix warnings in test_httpd.c + [Ralf S. Engelschall] + + *) Upgraded to final shtool 1.2.8 + [Ralf S. Engelschall] + + *) Added PTH_KEY_INIT + [Ralf S. Engelschall] + + *) Added PTH_MODE_STATIC for statically allocating + a per-thread event. This is now used by the various high-level functions + to avoid unnecessary alloc/free sequences. + [Ralf S. Engelschall] + + Changes between 0.9.9 and 0.9.10 (25-May-1999 to 28-May-1999) + + *) Cleaned up Makefile.in + [Ralf S. Engelschall] + + *) Upgraded to GNU libtool 1.3.2 + [Ralf S. Engelschall] + + *) Upgraded to new shtool 1.2.8 which includes scpp + [Ralf S. Engelschall] + + *) Merged all pth_foo.h's into pth_foo.c's with the help of shtool scpp + [Ralf S. Engelschall] + + *) Updated dependencies after pth_p.h overhauling + [Ralf S. Engelschall] + + *) Added TODO file + [Ralf S. Engelschall] + + Changes between 0.9.8 and 0.9.9 (24-May-1999 to 25-May-1999) + + *) Finally converted library generation to use GNU libtool + [Ralf S. Engelschall] + + *) Add hints to BIND 8 and adns to manual page + [Ralf S. Engelschall] + + *) Fixed memory leaks in test_httpd and test_mp + [Ralf S. Engelschall, Flux ] + + *) Fixed typos in manual page + [Ralf S. Engelschall] + + *) Fix -lsocket -lnsl tests for Siemens platforms + [Ralf S. Engelschall] + + *) Fix chmod in Autoconf stuff + [Ralf S. Engelschall] + + *) Removed unneccessary pth_ring_linked() + [Ralf S. Engelschall] + + Changes between 0.9.7 and 0.9.8 (23-May-1999 to 24-May-1999) + + *) Fixed bug in priority queue element counting (q_num) + [Ralf S. Engelschall] + + *) pth_spawn() now inherits the attributes from the parent thread + [Ralf S. Engelschall] + + *) Merged pth_stat() and pth_load() into a generic extensible pth_ctrl() + [Ralf S. Engelschall] + + *) Added new pth_fork() function + [Ralf S. Engelschall] + + *) Added depend target to Makefile.in and generated dependencies + [Ralf S. Engelschall] + + *) Moved joinable argument from pth_attr() to the flags argument + [Ralf S. Engelschall] + + *) Added PTH_CTRL_GETPRIO and PTH_CTRL_GETNAME. + [Ralf S. Engelschall] + + *) Typo was everywhere: preemtive => preemptive + [Ralf S. Engelschall] + + *) Typo was everywhere: occured => occurred + [Ralf S. Engelschall] + + *) Finished manual page + [Ralf S. Engelschall] + + *) Removed useless PTH_UNTIL_RUNNING + [Ralf S. Engelschall] + + *) Replaced errno support with a better variant + [Ralf S. Engelschall] + + *) Lots of small fixes and portability cleanups + [Ralf S. Engelschall] + + Changes between 0.9.6 and 0.9.7 (22-May-1999 to 23-May-1999) + + *) Added PORTING document. + [Ralf S. Engelschall] + + *) Added errno support (pth_errno.[ch]). + [Ralf S. Engelschall] + + *) Added exponential average load calculations for scheduler. The current + load value can be retrieved by the application through pth_load(). + [Ralf S. Engelschall] + + Changes between 0.9.5 and 0.9.6 (21-May-1999 to 22-May-1999) + + *) Added more documentation. + [Ralf S. Engelschall] + + *) Autoconf now determines the direction of stack grow and pth_mctx_set() + uses this information for sigstack() now. + [Ralf S. Engelschall] + + *) Fixed acconfig.h + [Ralf S. Engelschall] + + *) Increased stacksizes (was too small for Solaris and friends) + [Ralf S. Engelschall] + + *) Switched from BSD-style license to LGPL license + [Ralf S. Engelschall] + + *) Fixed a nasty bug in scheduler: + when a thread was moved from the wait to the ready queue, it's state + wasn't changed to pth_state_ready. This way the next time it was handled + it was incorrectly filed to the waiting queue (which caused core dumps + because the ev_waiting/ev_occurred pointers didn't exist). This way now + the stuff works great also under Solaris! + [Ralf S. Engelschall] + + Changes between 0.9.4 and 0.9.5 (21-May-1999 to 21-May-1999) + + *) Renamed pth_{get,set}specific() to pth_key_{get,set}data(). + [Ralf S. Engelschall] + + *) Renamed remaining pth_message_xxx() to pth_msgport_xxx() + [Ralf S. Engelschall] + + *) Added pth_{readline,read,write}_ev() functions which are similar to + pth_{readline,read,write}() but have an additional event argument which + can be used for timeouts and other parallel events. + [Ralf S. Engelschall] + + Changes between 0.9.3 and 0.9.4 (14-May-1999 to 21-May-1999) + + *) Added ring datastructures (pth_ring.[ch]). + [Ralf S. Engelschall] + + *) Add an AmigaOS-style message port facility (pth_msg.[ch]). + [Ralf S. Engelschall] + + *) Added a message port related test program (test_mp.c). + [Ralf S. Engelschall] + + *) Fix scheduler event management bug: when no I/O events existed + plus a next timer but other events (e.g. message ports) already occurred, + the scheduler blocked instead of handling the already occurred events + first. + [Ralf S. Engelschall] + + *) Fix bug in event creating: the event occurrence flag has to be cleared in + pth_wait() to avoid spinning events which were already occurred. + [Ralf S. Engelschall] + + Changes between 0.9.2 and 0.9.3 (14-May-1999 to 14-May-1999) + + *) Added pth_once() for later (pthreads!) + [Ralf S. Engelschall] + + *) Splitted pth.c into pth.c and pth_high.c + [Ralf S. Engelschall] + + *) Added pth_data.[ch] with pthread style data storage stuff + [Ralf S. Engelschall] + + *) Moved readline stuff from test_httpd to pth_high.c as pth_readline() + [Ralf S. Engelschall] + + *) Removed debugging fprintf from test_httpd to speed it up + [Ralf S. Engelschall] + + *) Fixed listen() call: now uses REQ_MAX for backlog and tests for -1 + [Ralf S. Engelschall] + + *) Fix a polling-related timer bug in the event manager + [Ralf S. Engelschall] + + Changes between 0.9.1 and 0.9.2 (13-May-1999 to 14-May-1999) + + *) renamed pth_asynchronize() to pth_nonblocking() + [Ralf S. Engelschall] + + *) removed implicit pth_nonblocking() calls + [Ralf S. Engelschall] + + *) speeded up pth_accept by optimizing event alloc/free + [Ralf S. Engelschall] + + *) cleaned up pth_waitpid + [Ralf S. Engelschall] + + *) Changed semantics of pth_wait(var, NULL): it now means + that the events in var are not removed (although their + chanining might be changed) + [Ralf S. Engelschall] + + *) Renamed internal pth_usleep() to pth_time_usleep() + [Ralf S. Engelschall] + + *) Replaced pth_sleep() with pth_nap() and added + two replacement functions: pth_sleep() for a variant + of sleep(3) and pth_usleep() for a variant of usleep(3). + [Ralf S. Engelschall] + + *) Optimized scheduler a little bit by inlining pth_time_{set,add,sub} + [Ralf S. Engelschall] + + *) Added pth_pqueue_{head,walk} functions and used it in eventmanager + [Ralf S. Engelschall] + + *) Rewrote pth_sched_eventmanager() without a surrounding loop + [Ralf S. Engelschall] + + *) Implemented a readline() function to speedup test_httpd + [Ralf S. Engelschall] + + Changes between 0.9.0 and 0.9.1 (12-May-1999 to 13-May-1999) + + *) Imported into CVS repository + [Ralf S. Engelschall] + + Changes between GENESIS and 0.9.0 (Feb-1999 to 12-May-1999) + + *) Created initial version on FreeBSD + [Ralf S. Engelschall] + + *) Ported to Linux + [Ralf S. Engelschall] + diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..048b421 --- /dev/null +++ b/HACKING @@ -0,0 +1,164 @@ + ____ _ _ + | _ \| |_| |__ + | |_) | __| '_ \ + | __/| |_| | | | ``Real hackers can write assembly + |_| \__|_| |_| code in any language.'' + + GNU Pth - The GNU Portable Threads + + HACKING + ======= + + HOW TO BE ALWAYS UP TO DATE + --------------------------- + + Those who want to be always at the bleeding edge or even want to + hack on the Pth sources can browse the latest Pth source tree on + http://cvs.ossp.org/pkg/lib/pth/ or retrieve these sources via + Anonymous-CVS from the OSSP master repository. + + For this you need CVS 1.10 or later. If you still don't have CVS installed, + grab it from http://www.cvshome.org/ and install it first. Then you can + check out the Pth source tree via the following steps: + + | $ CVSROOT=:pserver:anonymous@cvs.ossp.org:/e/ossp/cvs + | $ export CVSROOT + | $ cvs login + | (Logging in to anonymous@cvs.ossp.org) + | CVS password: + [use an empty password by just pressing RETURN] + | $ cvs -z3 checkout pth + | cvs server: Updating pth + | U pth/.configure + | U pth/.cvsignore + | U pth/.gdbinit + | U pth/AUTHORS + | U pth/COPYING + | U pth/ChangeLog + | U pth/INSTALL + | U pth/Makefile.in + | U pth/NEWS + | : : + + Then start hacking on your local changes. You cannot commit it to the + repository, of course, because you've read-only access only. But you + can let the changes stay around in your checkout tree and whenever + changes occur in the master version (because of commits by the author) + you can update your version from time to time via: + + | $ cd pth + | $ cvs -z3 update + | cvs server: Updating . + | U HACKING + | : : + + If you want to contribute your changes to the author, create a + unified difference file as described below and send the generated + pth.diff file to pth-users@gnu.org (to send it to the public) or + bug-pth@gnu.org (to send it only to the author). + + | $ cd pth + | $ cvs diff -u3 . >pth.diff + + Read the comprehensive CVS user manual (included in the CVS + distrubtion as `doc/cvs.ps') for more details on how to work with CVS. + + OVERVIEW OF THE SOURCE TREE + --------------------------- + + Here is a brief overview of the source tree. + + .gdbinit .............. GDB rc file for use with Pth + .dmallocrc ............ DMalloc rc file for use with Pth + + AUTHORS ............... List of major package authors + COPYING ............... Copying conditions (the LGPL) + ChangeLog ............. The detailed list of every source change + HACKING ............... This document + HISTORY ............... List of released Pth versions + INSTALL ............... Installation Instructions + Makefile.in ........... Build procedure for a standard Make tool + NEWS .................. The list of major changes between version + PORTING ............... Instructions for porting Pth to new platforms + README ................ The general package introduction text + SUPPORT ............... Hints for user support + TESTS ................. Results from tests with real-world applications + THANKS ................ List of credits to people + USERS ................. List of packages utilizing Pth + + acconfig.h ............ Autoconf header (the input for pth_acdef.h.in) + acheader.m4 ........... Autoconf macros for use with autoheader + aclocal.m4 ............ Autoconf macros (for configure) + config.guess .......... Autoconf platform guessing tool (part I) + config.param .......... Autoconf command line parameter collections + config.sub ............ Autoconf platform guessing tool (part II) + configure ............. Autoconf script (pre-generated from configure.ac) + configure.ac .......... Autoconf script source + + ltconfig .............. Libtool configuration script + ltmain.sh ............. Libtool main template + + pth-config.1 .......... Pth config script manual page (pre-generated) + pth-config.in ......... Pth config script input + pth-config.pod ........ Pth config script manual page source + pth.3 ................. Pth manual page (pre-generated) + pth.pod ............... Pth manual page source + + pth_acdef.h.in ........ Autoconf header with definitions (generated) + pth_acmac.h.in ........ Autoconf header with macros + pth.h.in .............. Public header file source + pth_p.h.in ............ Private header file source + + pth_attr.c ............ Pth module source: attribute objects + pth_cancel.c .......... Pth module source: cancellation + pth_clean.c ........... Pth module source: cleanup handler + pth_compat.c .......... Pth module source: platform compatibility + pth_data.c ............ Pth module source: thread local data + pth_debug.c ........... Pth module source: debugging support + pth_errno.c ........... Pth module source: errno handling + pth_event.c ........... Pth module source: event objects + pth_ext.c ............. Pth module source: extensional functionality + pth_fork.c ............ Pth module source: fork support + pth_high.c ............ Pth module source: high-level functions + pth_lib.c ............. Pth module source: standard library functions + pth_mctx.c ............ Pth module source: maschine context handling + pth_msg.c ............. Pth module source: message ports + pth_pqueue.c .......... Pth module source: priority queue data structure + pth_ring.c ............ Pth module source: ring data structure + pth_sched.c ........... Pth module source: scheduler + pth_string.c .......... Pth module source: string functions + pth_sync.c ............ Pth module source: synchronizations objects + pth_syscall.c ......... Pth module source: hard system call support + pth_tcb.c ............. Pth module source: thread control block + pth_time.c ............ Pth module source: time handling + pth_util.c ............ Pth module source: utility functions + pth_vers.c ............ Pth module source: library version (generated) + + pthread-config.1 ...... Pthread API config script manual page (pre-generated) + pthread-config.in ..... Pthread API config script input + pthread-config.pod .... Pthread API config script manual page source + pthread.3 ............. Pthread API manual page (pre-generated) + pthread.pod ........... Pthread API manual page source + pthread.c ............. Pthread API functions + pthread.h.in .......... Pthread API public header source + + pthread.ps ............ Pthread API overview (from SMI) + rse-pmt.ps ............ Article `Portable Multithreading' for pth_mctx.c + + shtool ................ Shtool script + + striptease.mk ......... Makefile for stripped source tree + striptease.pl ......... Perl Script for stripping the source tree + + test_common.c ......... Test common functions + test_common.h ......... Test common header + test_httpd.c .......... Test module: Faked HTTP Daemon + test_misc.c ........... Test module: Miscellaneous + test_mp.c ............. Test module: Message Ports + test_philo.c .......... Test module: Five Dining Philosophers + test_pthread.c ........ Test module: Pthread API + test_select.c ......... Test module: pth_select(3) handling + test_sfio.c ........... Test module: AT&T Sfio support + test_sig.c ............ Test module: Signal handling + test_std.c ............ Test module: Standard Test + diff --git a/HISTORY b/HISTORY new file mode 100644 index 0000000..9558e0f --- /dev/null +++ b/HISTORY @@ -0,0 +1,110 @@ + ____ _ _ + | _ \| |_| |_ + | |_) | __| '_ \ + | __/| |_| | | | ``Release early and often.'' + |_| \__|_| |_| -- Eric S. Raymond + + GNU Pth - The GNU Portable Threads + + HISTORY + ======= + + The following list provides an overview of the released GNU Pth + versions and this way shows its history and evolution. + + __Date_____ __Version___ __Type_____ + 12-May-1999 0.9.0 pre-release + 13-May-1999 0.9.1 pre-release + 14-May-1999 0.9.2 pre-release + 14-May-1999 0.9.3 pre-release + 21-May-1999 0.9.4 pre-release + 21-May-1999 0.9.5 pre-release + 22-May-1999 0.9.6 pre-release + 23-May-1999 0.9.7 pre-release + 24-May-1999 0.9.8 pre-release + 25-May-1999 0.9.9 pre-release + 28-May-1999 0.9.10 pre-release + 28-May-1999 0.9.11 pre-release + 30-May-1999 0.9.12 pre-release + 01-Jun-1999 0.9.13 pre-release + 01-Jun-1999 0.9.14 pre-release + 04-Jun-1999 0.9.15 pre-release + 09-Jun-1999 0.9.16 pre-release + 18-Jun-1999 0.9.17 pre-release + 20-Jun-1999 0.9.18 pre-release + 21-Jun-1999 0.9.19 pre-release + 24-Jun-1999 0.9.20 pre-release + 25-Jun-1999 0.9.21 pre-release + 28-Jun-1999 1.0b1 beta + 04-Jul-1999 1.0b2 beta + 07-Jul-1999 1.0b3 beta + 08-Jul-1999 1.0b4 beta + 11-Jul-1999 1.0b5 beta + 14-Jul-1999 1.0b6 beta + 14-Jul-1999 1.0b7 beta + 16-Jul-1999 1.0b8 beta + 16-Jul-1999 1.0.0 release + 22-Jul-1999 1.0.1 release + 28-Jul-1999 1.0.2 release + 30-Jul-1999 1.0.3 release + 03-Aug-1999 1.0.4 release + 07-Aug-1999 1.1b1 beta + 10-Aug-1999 1.0.5 release + 10-Aug-1999 1.1b2 beta + 11-Aug-1999 1.1b3 beta + 13-Aug-1999 1.1b4 beta + 17-Aug-1999 1.1b5 beta + 18-Aug-1999 1.1b6 beta + 18-Aug-1999 1.1b7 beta + 19-Aug-1999 1.1.0 release + 21-Aug-1999 1.1.1 release + 23-Aug-1999 1.1.2 release + 27-Aug-1999 1.1.3 release + 30-Aug-1999 1.1.4 release + 02-Sep-1999 1.2b1 beta + 02-Sep-1999 1.1.5 release + 04-Sep-1999 1.2b2 beta + 17-Sep-1999 1.2b3 beta + 17-Sep-1999 1.2b4 beta + 21-Sep-1999 1.2b5 beta + 28-Sep-1999 1.1.6 release + 28-Sep-1999 1.2b6 beta + 22-Oct-1999 1.2b7 beta + 26-Oct-1999 1.2b8 beta + 21-Oct-1999 1.2.0 release + 09-Nov-1999 1.3a1 alpha + 14-Nov-1999 1.2.1 release + 30-Dec-1999 1.3a2 alpha + 08-Jan-2000 1.2.2 release + 08-Jan-2000 1.3a3 alpha + 08-Jan-2000 1.3a4 alpha + 15-Jan-2000 1.3a5 alpha + 26-Jan-2000 1.3b1 beta + 28-Jan-2000 1.3b2 beta + 04-Feb-2000 1.2.3 release + 13-Feb-2000 1.3b3 beta + 19-Feb-2000 1.3.0 release + 20-Feb-2000 1.3.1 release + 24-Feb-2000 1.3.2 release + 10-Mar-2000 1.3.3 release + 16-Apr-2000 1.3.4 release + 16-Apr-2000 1.4a1 alpha + 17-Apr-2000 1.3.5 release + 01-Jul-2000 1.3.6 release + 01-Jul-2000 1.4a2 alpha + 29-Jul-2000 1.3.7 release + 29-Jul-2000 1.4a3 alpha + 24-Mar-2001 1.4.0 release + 27-Jan-2002 1.4.1 release + 07-Nov-2002 2.0b0 alpha + 08-Nov-2002 2.0b1 alpha + 04-Dec-2002 2.0b2 alpha + 17-Feb-2003 2.0.0 release + 13-Jul-2004 2.0.1 release + 12-Sep-2004 2.0.2 release + 03-Dec-2004 2.0.3 release + 18-Feb-2005 2.0.4 release + 05-Oct-2005 2.0.5 release + 22-Nov-2005 2.0.6 release + 08-Jun-2006 2.0.7 release + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..29af102 --- /dev/null +++ b/INSTALL @@ -0,0 +1,218 @@ + ____ _ _ + | _ \| |_| |__ ``All the good things you want + | |_) | __| '_ \ to do in your life have to be + | __/| |_| | | | started in the next few hours, + |_| \__|_| |_| days or weeks.'' + -- Tom DeMarco + GNU Pth - The GNU Portable Threads + + INSTALL + ======= + + Overview + -------- + + To install the Pth library into /path/to/pth/{bin,lib,include,man}/ + perform the following steps in your shell: + + $ ./configure + --prefix=/path/to/pth + [--enable-batch] + [--enable-pthread] + [--enable-debug] + [--enable-profile] + [--enable-optimize] + [--enable-maintainer] + [--enable-tests] + [--disable-shared] + [--disable-static] + [--enable-syscall-soft] + [--enable-syscall-hard] + [--with-sfio[=DIR]] + [--with-ex[=DIR]] + [--with-dmalloc[=DIR]] + [--with-mctx-mth=ID] + [--with-mctx-dsp=ID] + [--with-mctx-stk=ID] + $ make + $ make test + $ make install + + Pth Options + ----------- + + The supported options have the following meaning: + + --prefix=DIR: installation path prefix + This sets the path prefix of installation tree. By default this + prefix is /usr/local. For fine-tuning the installation paths + run `./configure --help' and watch for the various path related + options. + + --enable-batch: build in batch mode (default=no) + This enables batch building. Currently this does + nothing more than supressing some displayed hints. + + --enable-maintainer: build maintainer targets (default=no) + This enables some maintainer build targets. + Not for use by end users. + + --enable-tests: build test targets (default=yes) + This enables the building of test targets, i.e. the various + test_xxx programs. If you don't want to build these use + --disable-tests. + + --enable-pthread: build with pthread library (default=no) + This enables the building and installation of the + POSIX Threads ("pthread") emulation API for Pth. + This per default forces --enable-syscall-soft. + + --enable-debug: build for debugging (default=no) + This is for debugging Pth and only interesting + for developers. + + --enable-profile: build for profiling (default=no) + This enables profiling with gprof and is only + interesting for developers. + + --enable-optimize: build with optimization (default=no) + This enables optimization flags, mainly for GCC. + + --disable-static: build static libraries (default=yes) + This disables the building of static libraries (libxx.a). + + --disable-shared: build shared libraries (default=yes) + This disables the building of shared libraries (libxx.so). + + --enable-syscall-soft: use soft system call mapping (default=no) + This enables the soft system call mapping for pth.h and pthread.h + + --enable-syscall-hard: use hard system call mapping (default=no) + This enables the hard system call mapping inside pth_syscall.c which + means that wrappers for system calls are exported by libpth. + + --with-sfio[=DIR] + This can be used to enable Sfio support (see pth_sfiodisc function) for + Pth. The paths to the include and library file of Sfio has to be either + given via CFLAGS and LDFLAGS or the DIR argument has to specify the root + of the Sfio installation tree. Sfio can be found at + http://www.research.att.com/sw/tools/sfio/. + + --with-ex[=DIR] + This can be used to enable OSSP ex support (exception handling) + for Pth. The paths to the include and library file of OSSP ex has + to be either given via CFLAGS and LDFLAGS or the DIR argument has + to specify the root of the OSSP ex installation tree. OSSP ex can + be found at http://www.ossp.org/pkg/ex/. + + --with-dmalloc[=DIR] + This can be used to enable Dmalloc support (debugging memory + allocations) for Pth. The paths to the include and library file of + Dmalloc has to be either given via CFLAGS and LDFLAGS or the DIR + argument has to specify the root of the Dmalloc installation tree. + Dmalloc can be found at http://www.dmalloc.com/. + + The remaining three options are really for experts only. They force + particular variants for the machine context implementation. Be carefully + here: Not all possibly variants of the three knobs actually work (they could + not work, even when we want!). + + --with-mctx-mth=ID [EXPERTS ONLY] + This forces Pth to use a particular machine context method. + Available variants are: + mcsc .... makecontext(2)/swapcontext(2) + sjlj .... setjmp(2)/longjmp(2) + + --with-mctx-dsp=ID [EXPERTS ONLY] + This forces Pth to use a particular machine context dispatching + approach. Available variants are: + sc ...... swapcontext(2) + ssjlj ... sigsetjmp(3)/siglongjmp(3) + sjlj .... setjmp(3)/longjmp(3) (signal mask aware) + usjlj ... _setjmp(3)/_longjmp(3) (signal mask aware) + sjlje ... setjmp(3)/longjmp(3) [emulated = plus sigprocmask(2)] + sjljlx .. setjmp(3)/longjmp(3), specific for anchient Linux version + sjljisc . setjmp(3)/longjmp(3), specific for Interactive Unix (ISC) + sjljw32 . setjmp(3)/longjmp(3), specific for Win32/CygWin + + --with-mctx-stk=ID [EXPERTS ONLY] + This forces Pth to use a particular machine context stack setup + approach. Available variants are: + none .... no standard stack setup (only for some sjljXXX above) + mc ...... makecontext(2) + sas ..... sigaltstack(2) + ss ...... sigstack(2) + + Compiler Flags + -------------- + + Some systems require unusual options for compilation or linking that the + `configure' script does not know about. You can give `configure' initial + values for variables by setting them in the environment. Using a + Bourne-compatible shell, you can do that on the command line like this: + + $ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + + Or on systems that have the `env' program, you can do it like this: + + $ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + + Compiling For Multiple Architectures + ------------------------------------ + + You can compile the package for more than one kind of computer at the same + time, by placing the object files for each architecture in their own + directory. To do this, you must use a version of `make' that supports the + `VPATH' variable, such as GNU `make'. `cd' to the directory where you want + the object files and executables to go and run the `configure' script. + `configure' automatically checks for the source code in the directory that + `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' variable, you + have to compile the package for one architecture at a time in the source + code directory. After you have installed the package for one architecture, + use `make distclean' before reconfiguring for another architecture. + + Installation Names + ------------------ + + By default, `make install' will install the package's files in + `/usr/local/bin', `/usr/local/man', etc. You can specify an installation + prefix other than `/usr/local' by giving `configure' the option + `--prefix=PATH'. + + You can specify separate installation prefixes for architecture-specific + files and architecture-independent files. If you give `configure' the + option `--exec-prefix=PATH', the package will use PATH as the prefix for + installing programs and libraries. Documentation and other data files will + still use the regular prefix. + + In addition, if you use an unusual directory layout you can give options + like `--bindir=PATH' to specify different values for particular kinds of + files. Run `configure --help' for a list of the directories you can set and + what kinds of files go in them. + + Specifying the System Type + -------------------------- + + There may be some features `configure' can not figure out automatically, but + needs to determine by the type of host the package will run on. Usually + `configure' can figure that out, but if it prints a message saying it can + not guess the host type, give it the `--host=TYPE' option. TYPE can either + be a short name for the system type, such as `sun4', or a canonical name + with three fields: CPU-COMPANY-SYSTEM + + See the file `config.sub' for the possible values of each field. If + `config.sub' isn't included in this package, then this package doesn't need + to know the host type. + + Sharing Defaults + ---------------- + + If you want to set default values for `configure' scripts to share, you can + create a site shell script called `config.site' that gives default values + for variables like `CC', `cache_file', and `prefix'. `configure' looks for + `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' + if it exists. Or, you can set the `CONFIG_SITE' environment variable to + the location of the site script. + diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..328aea1 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,464 @@ +## +## GNU Pth - The GNU Portable Threads +## Copyright (c) 1999-2006 Ralf S. Engelschall +## +## This file is part of GNU Pth, a non-preemptive thread scheduling +## library which can be found at http://www.gnu.org/software/pth/. +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +## USA, or contact Ralf S. Engelschall . +## +## Makefile.in: Pth Makefile input +## + # ``UNIX -- where you can do anything + # in two keystrokes, or less...'' +@SET_MAKE@ + +## +## ____ PATH DEFINITIONS ___________________________________________ +## + +VPATH = @srcdir@ +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ + +S = @srcdir_prefix@ +C = ./ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +libdir = @libdir@ +includedir = @includedir@ +mandir = @mandir@ +datadir = @datadir@ + +DESTDIR = + +## +## ____ TOOL DEFINITIONS ___________________________________________ +## + +SHELL = /bin/sh +CC = @CC@ +CPPFLAGS = @CPPFLAGS@ -I. +CFLAGS = @CFLAGS@ +LDFLAGS = @LDFLAGS@ +MKFLAGS = $(MFLAGS) DESTDIR=$(DESTDIR) +LIBS = @LIBS@ +SHTOOL = $(srcdir)/shtool +LIBTOOL = $(C)libtool +RM = rm -f +RMDIR = rmdir +TRUE = true +CAT = cat +CP = cp +SED = sed +ECHO = echo +GZIP = gzip +GTAR = gtar +TARDY = tardy +POD2MAN = pod2man +GDB = gdb +PERL = perl + +## +## ____ TARGET DEFINITIONS _________________________________________ +## + +BATCH = @BATCH@ +PLATFORM = @PLATFORM@ +PTH_MCTX_ID = @PTH_MCTX_ID@ +PTH_STACK_GROWTH = @PTH_STACK_GROWTH@ + +TARGET_ALL = @TARGET_ALL@ +TARGET_PREQ = pth_p.h +TARGET_LIBS = libpth.la @LIBPTHREAD_LA@ +TARGET_MANS = $(S)pth-config.1 $(S)pth.3 @PTHREAD_CONFIG_1@ @PTHREAD_3@ +TARGET_TEST = test_std test_mp test_misc test_philo test_sig \ + test_select test_httpd test_sfio test_uctx @TEST_PTHREAD@ + +# object files for library generation +# (order is just aesthetically important) +LOBJS = pth_debug.lo pth_ring.lo pth_pqueue.lo pth_time.lo pth_errno.lo pth_mctx.lo \ + pth_uctx.lo pth_tcb.lo pth_sched.lo pth_attr.lo pth_lib.lo pth_event.lo \ + pth_data.lo pth_clean.lo pth_cancel.lo pth_msg.lo pth_sync.lo pth_fork.lo \ + pth_util.lo pth_high.lo pth_syscall.lo pth_ext.lo pth_compat.lo pth_string.lo + +# source files for header generation +# (order is important and has to follow dependencies in pth_p.h) +HSRCS = $(S)pth_compat.c $(S)pth_debug.c $(S)pth_syscall.c $(S)pth_errno.c $(S)pth_ring.c $(S)pth_mctx.c \ + $(S)pth_uctx.c $(S)pth_clean.c $(S)pth_time.c $(S)pth_tcb.c $(S)pth_util.c $(S)pth_pqueue.c $(S)pth_event.c \ + $(S)pth_sched.c $(S)pth_data.c $(S)pth_msg.c $(S)pth_cancel.c $(S)pth_sync.c $(S)pth_attr.c $(S)pth_lib.c \ + $(S)pth_fork.c $(S)pth_high.c $(S)pth_ext.c $(S)pth_string.c $(S)pthread.c + +## +## ____ UTILITY DEFINITIONS _________________________________________ +## + +_VERSION_FILE = \ + $(S)pth_vers.c + +_VERSION = \ + echo "updating package version"; \ + $(SHTOOL) version -lc -n 'GNU Pth' -p pth_internal_ $$OPT $(_VERSION_FILE); \ + V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \ + $(SED) -e "s/Version .*(.*)/Version $$V/g" README.n && mv README.n README; \ + V=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \ + $(SED) -e "s/%define ver .*/%define ver $$V/g" pth.spec.n && mv pth.spec.n pth.spec + +_TARBALL = \ + $(SHTOOL) tarball -o $${NAME}.tar.gz -d $${NAME} -u gnu -g pth \ + -e 'CVS,\.cvsignore,\.configure,\.\#.*,\.[ao]$$' -c 'gzip --best' . + +_MANPAGE = \ + echo "Formatting $${BASENAME}.pod into $${BASENAME}.$${SEC} via $(POD2MAN)"; \ + V1=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \ + V2=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \ + D=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE) |\ + $(SED) -e 's;.*(;;' -e 's;).*;;'`; \ + $(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \ + --release="$$D" --date="$${NAME} $$V1" $(S)$${BASENAME}.pod |\ + $(SED) -e "s;PTH_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC} + +_DEBUG = \ + core=""; \ + if [ -f $$TEST.core ]; then \ + core="$$TEST.core"; \ + elif [ -f core ]; then \ + core="core"; \ + fi; \ + $(LIBTOOL) --mode=execute $(GDB) $$TEST $$core + +## +## ____ END USER TARGETS ____________________________________________ +## + +# be aware of libtool when building the objects +.SUFFIXES: +.SUFFIXES: .c .o .lo +.c.o: + $(CC) -c $(CPPFLAGS) $(CFLAGS) $< +.c.lo: + $(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $< + +# the default target +all: all-normal +all-normal: $(TARGET_ALL) + @touch .done-all >/dev/null 2>&1 || $(TRUE) + @$(MAKE) $(MKFLAGS) what-next +all-for-install: $(TARGET_ALL) + @touch .done-all >/dev/null 2>&1 || $(TRUE) + +# build the private shared header file +pth_p.h: $(S)pth_p.h.in + $(SHTOOL) scpp -o pth_p.h -t $(S)pth_p.h.in -Dcpp -Cintern -M '==#==' $(HSRCS) + +# build the static and possibly shared libraries +libpth.la: $(LOBJS) + $(LIBTOOL) --mode=link --quiet $(CC) -o libpth.la $(LOBJS) \ + -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)` +libpthread.la: pthread.lo $(LOBJS) + $(LIBTOOL) --mode=link --quiet $(CC) -o libpthread.la pthread.lo $(LOBJS) \ + -rpath $(libdir) -version-info `$(SHTOOL) version -lc -dlibtool $(_VERSION_FILE)` + +# build the manual pages +$(S)pth-config.1: $(S)pth-config.pod $(_VERSION_FILE) + @BASENAME="pth-config"; SEC=1; \ + NAME="GNU Pth"; ONELINE="GNU Portable Threads"; \ + $(_MANPAGE) +$(S)pth.3: $(S)pth.pod $(_VERSION_FILE) + @BASENAME="pth"; SEC=3; \ + NAME="GNU Pth"; ONELINE="GNU Portable Threads"; \ + $(_MANPAGE) +$(S)pthread-config.1: $(S)pthread-config.pod $(_VERSION_FILE) + @BASENAME="pthread-config"; SEC=1; \ + NAME="GNU Pth"; ONELINE="POSIX Threading API of GNU Pth"; \ + $(_MANPAGE) +$(S)pthread.3: $(S)pthread.pod $(_VERSION_FILE) + @BASENAME="pthread"; SEC=3; \ + NAME="GNU Pth"; ONELINE="POSIX Threading API of GNU Pth"; \ + $(_MANPAGE) + +# build test program +test_std: test_std.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_std test_std.o test_common.o libpth.la $(LIBS) +test_httpd: test_httpd.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_httpd test_httpd.o test_common.o libpth.la $(LIBS) +test_misc: test_misc.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_misc test_misc.o test_common.o libpth.la $(LIBS) +test_mp: test_mp.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_mp test_mp.o test_common.o libpth.la $(LIBS) +test_philo: test_philo.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_philo test_philo.o test_common.o libpth.la $(LIBS) +test_sig: test_sig.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_sig test_sig.o test_common.o libpth.la $(LIBS) +test_select: test_select.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_select test_select.o test_common.o libpth.la $(LIBS) +test_sfio: test_sfio.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_sfio test_sfio.o test_common.o libpth.la $(LIBS) +test_uctx: test_uctx.o test_common.o libpth.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_uctx test_uctx.o test_common.o libpth.la $(LIBS) +test_pthread: test_pthread.o test_common.o libpthread.la + $(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o test_pthread test_pthread.o test_common.o libpthread.la $(LIBS) + +# install the package +install: all-for-install + @$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ + @touch .done-install >/dev/null 2>&1 || $(TRUE) + @$(MAKE) $(MKFLAGS) what-next +install-dirs: + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir) + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir) + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3 + $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/aclocal +install-pth: + $(SHTOOL) install -c -m 755 pth-config $(DESTDIR)$(bindir)/pth-config + $(SHTOOL) install -c -m 644 $(S)pth-config.1 $(DESTDIR)$(mandir)/man1/pth-config.1 + $(SHTOOL) install -c -m 644 $(S)pth.3 $(DESTDIR)$(mandir)/man3/pth.3 + $(SHTOOL) install -c -m 644 $(S)pth.m4 $(DESTDIR)$(datadir)/aclocal/pth.m4 + $(SHTOOL) install -c -m 644 pth.h $(DESTDIR)$(includedir)/pth.h + @umask 022; $(LIBTOOL) --mode=install \ + $(SHTOOL) install -c libpth.la $(DESTDIR)$(libdir)/libpth.la +install-pthread: + $(SHTOOL) install -c -m 755 pthread-config $(DESTDIR)$(bindir)/pthread-config + $(SHTOOL) install -c -m 644 $(S)pthread-config.1 $(DESTDIR)$(mandir)/man1/pthread-config.1 + $(SHTOOL) install -c -m 644 pthread.h $(DESTDIR)$(includedir)/pthread.h + $(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3 + @umask 022; $(LIBTOOL) --mode=install \ + $(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la + +# uninstall the package +uninstall: + @$(MAKE) $(MKFLAGS) @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs + @touch .done-uninstall >/dev/null 2>&1 || $(TRUE) + @$(MAKE) $(MKFLAGS) what-next +uninstall-pthread: + $(RM) $(DESTDIR)$(bindir)/pthread-config + $(RM) $(DESTDIR)$(mandir)/man1/pthread-config.1 + $(RM) $(DESTDIR)$(includedir)/pthread.h + $(RM) $(DESTDIR)$(mandir)/man3/pthread.3 + @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libpthread.la +uninstall-pth: + $(RM) $(DESTDIR)$(bindir)/pth-config + $(RM) $(DESTDIR)$(mandir)/man1/pth-config.1 + $(RM) $(DESTDIR)$(mandir)/man3/pth.3 + $(RM) $(DESTDIR)$(datadir)/aclocal/pth.m4 + $(RM) $(DESTDIR)$(includedir)/pth.h + @$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libpth.la +uninstall-dirs: + -$(RMDIR) $(DESTDIR)$(datadir)/aclocal >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(datadir) >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(mandir)/man3 >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(libdir) >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) + -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) + +# strip down the source tree to its minimum +striptease: + @PERL=`which perl`; if [ ".$$PERL" = . ]; then \ + echo "make:ERROR: command \"$(MAKE) striptease\" requires \"perl\"" 1>&2; \ + exit 1; \ + fi; \ + $$PERL striptease.pl + +# clean the source tree for re-building +clean: + $(RM) $(TARGET_PREQ) + $(RM) $(TARGET_TEST) + $(RM) $(TARGET_LIBS) + $(RM) *.o *.lo + $(RM) .libs/* + -$(RMDIR) .libs >/dev/null 2>&1 || $(TRUE) + $(RM) core *.core + $(RM) .done-* + +# clean the source tree for re-configuring and re-building +distclean: clean + $(RM) Makefile + $(RM) pth-config pth_acdef.h pth_acmac.h pth.h + $(RM) pthread-config pthread.h + $(RM) config.log config.cache config.status + $(RM) libtool + $(RM) *.bak *~ + +# clean the source tree by removing really all generate stuff +realclean: distclean + $(RM) $(TARGET_MANS) + ./devtool autoclean + +# give hints what to do as the next step +what-next: + -@if [ ".$(BATCH)" != .yes ]; then \ + if [ ".$(WHEN)" != . ]; then \ + when="$(WHEN)"; \ + else \ + when="Now"; \ + fi; \ + echo ""; \ + if [ ! -f .done-all ]; then \ + cmd=`$(SHTOOL) echo -e "%Bmake%b"`; \ + echo "$$when please type \`$$cmd' to compile. Good luck."; \ + elif [ ! -f .done-test ]; then \ + cmd=`$(SHTOOL) echo -e "%Bmake test%b"`; \ + echo "$$when please type \`$$cmd' to run a quick test suite. Hope it works."; \ + elif [ ! -f .done-install ]; then \ + cmd=`$(SHTOOL) echo -e "%Bmake install%b"`; \ + echo "$$when please type \`$$cmd' to install the package."; \ + elif [ ! -f .done-uninstall ]; then \ + cmd=`$(SHTOOL) echo -e "%Bmake uninstall%b"`; \ + echo "$$when use the package (you can remove it later via \`$$cmd')."; \ + cmd=`$(SHTOOL) echo -e "%Becho \"subscribe pth-users\" | mail pth-users-request@gnu.org%b"`; \ + echo "Additionally you should consider subscribing to the GNU Pth support"; \ + echo "mailing list pth-users@gnu.org by running the following command:"; \ + echo "\`$$cmd'"; \ + else \ + echo "$$when there is nothing more you can do here... ;)"; \ + echo "There is just \`make clean' left for you."; \ + fi; \ + echo ""; \ + fi + +# execute and debug one of the test programs +test: test-std +test-std: test_std + -@./test_std; \ + if [ $$? -eq 0 ]; then \ + touch .done-test >/dev/null 2>&1 || $(TRUE); \ + if [ ".`grep $(PLATFORM) $(S)PORTING`" = . ]; then \ + VERSION=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \ + echo "Please send the following summary line via Email to the author"; \ + echo "Ralf S. Engelschall for inclusion into"; \ + echo "the list of successfully tested platforms (see PORTING file):"; \ + echo ""; \ + $(SHTOOL) echo -e "Pth: %BOK%b: %B$(PLATFORM)%b | %B$(PTH_MCTX_ID)%b | %B$(PTH_STACK_GROWTH)%b | %B$$VERSION%b"; \ + $(MAKE) $(MKFLAGS) what-next WHEN="Then"; \ + else \ + $(MAKE) $(MKFLAGS) what-next WHEN="Now"; \ + fi; \ + exit 0; \ + else \ + VERSION=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \ + echo "Please send the following summary line together with details about"; \ + $(SHTOOL) echo -e "the configuration (%Bpth_acdef.h%b, %Bpth_acmac.h%b, %Bconfig.status%b, %Bconfig.log%b)"; \ + echo "and build/test steps (output of 'make' and 'make test') to the author"; \ + echo "Ralf S. Engelschall to help him in tracking"; \ + echo "down your platform problem."; \ + echo ""; \ + $(SHTOOL) echo -e "Pth: %BFAILED%b: %B$(PLATFORM)%b | %B$(PTH_MCTX_ID)%b | %B$(PTH_STACK_GROWTH)%b | %B$$VERSION%b"; \ + echo ""; \ + exit 1; \ + fi +test-httpd: test_httpd + ./test_httpd +test-mp: test_mp + ./test_mp +test-misc: test_misc + ./test_misc +test-philo: test_philo + ./test_philo +test-sig: test_sig + ./test_sig +test-select: test_select + ./test_select +test-sfio: test_sfio + ./test_sfio +test-uctx: test_uctx + ./test_uctx +test-pthread: test_pthread + ./test_pthread +debug: debug-std +debug-std: test_std + TEST=test_std && $(_DEBUG) +debug-httpd: test_httpd + TEST=test_httpd && $(_DEBUG) +debug-mp: test_mp + TEST=test_mp && $(_DEBUG) +debug-misc: test_misc + TEST=test_misc && $(_DEBUG) +debug-philo: test_philo + TEST=test_philo && $(_DEBUG) +debug-sig: test_sig + TEST=test_sig && $(_DEBUG) +debug-select: test_select + TEST=test_select && $(_DEBUG) +debug-sfio: test_sfio + TEST=test_sfio && $(_DEBUG) +debug-uctx: test_uctx + TEST=test_uctx && $(_DEBUG) +debug-pthread: test_pthread + TEST=test_pthread && $(_DEBUG) + +# GNU compat targets +check: test +installcheck: +installdirs: install-dirs +install-strip: install +mostlyclean: clean +maintainer-clean: realclean +info: +dvi: +TAGS: + +## +## ____ DEPENDENCY AREA ____________________________________________ +## (AUTOMATICALLY UPDATED - DO NOT EDIT) +## + +$(LOBJS): Makefile + +# DO NOT REMOVE +pth_attr.lo: pth_attr.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_cancel.lo: pth_cancel.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_clean.lo: pth_clean.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_compat.lo: pth_compat.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_data.lo: pth_data.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_debug.lo: pth_debug.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_errno.lo: pth_errno.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_event.lo: pth_event.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_ext.lo: pth_ext.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_fork.lo: pth_fork.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_high.lo: pth_high.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_lib.lo: pth_lib.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_mctx.lo: pth_mctx.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_msg.lo: pth_msg.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_pqueue.lo: pth_pqueue.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_ring.lo: pth_ring.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_sched.lo: pth_sched.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_string.lo: pth_string.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_sync.lo: pth_sync.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_syscall.lo: pth_syscall.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_tcb.lo: pth_tcb.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_time.lo: pth_time.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_util.lo: pth_util.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +pth_vers.lo: pth_vers.c pth_vers.c +pthread.o: pthread.c pthread.h pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h +test_common.o: test_common.c pth.h test_common.h +test_httpd.o: test_httpd.c pth.h test_common.h +test_misc.o: test_misc.c pth.h +test_mp.o: test_mp.c pth.h test_common.h +test_philo.o: test_philo.c pth.h test_common.h +test_pthread.o: test_pthread.c pthread.h +test_select.o: test_select.c pth.h +test_sfio.o: test_sfio.c pth.h +test_uctx.o: test_uctx.c pth.h +test_sig.o: test_sig.c pth.h +test_std.o: test_std.c pth.h diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..fea5df4 --- /dev/null +++ b/NEWS @@ -0,0 +1,91 @@ + ____ _ _ + | _ \| |_| |__ ``Nothing travels faster than the speed + | |_) | __| '_ \ of light with the possible exception of + | __/| |_| | | | bad news, which obeys its own special laws.'' + |_| \__|_| |_| -- Douglas Adams + + GNU Pth - The GNU Portable Threads + + NEWS + ==== + + This is a list of user-visible and/or major changes to GNU Pth. + For more details please have a look at the ChangeLog file. + + Changes between 1.4 and 2.0 (24-Mar-2001 to 17-Feb-2003) + + *) Make pth_poll(3) more compliant to POSIX.1-2001/SUSv3 poll(2). + *) Make pth_select(3) more compliant to POSIX.1-2001/SUSv3 select(2). + *) Replaced pth_event_occurred() with pth_event_status(). + *) Add Autoconf option --with-fdsetsize=NUM for enlarging FD_SETSIZE. + *) Added thread attribute PTH_ATTR_DISPATCHES. + *) Added sub-API pth_uctx_* for user-space context switching. + *) Add a Pth variant of the new POSIX pselect(2) function. + *) Internally cleaned up the error handling macros. + *) Added POSIX-compliant sanity checks for bad fds. + *) Added pth_nanosleep() function. + *) Allow a NULL name for pth_msgport_create() + *) Completely rewrote the "hard syscall mapping". + *) Added support to pth_poll(3) for POLLD{RD,WR}{NORM,BAND}. + *) Fixed a long-standing termination bug in pth_exit(3). + *) Upgraded to Autoconf 2.57, Shtool 1.6.2 and Libtool 1.4.3. + *) Add optional support for OSSP ex based exception handling. + + Changes between 1.3 and 1.4 (19-Feb-2000 to 24-Mar-2001) + + *) Support for non-standard but required header + *) New if-clause feature for config.param files + *) Added RPM specification (pth.spec) to source tree + *) Additional I/O functions pth_{recv,recvfrom,send,sendto}[_ev]() + *) Additional replacement function pth_system() + *) New self-contained pth_[v][a]sprintf() replacement functions + *) Upgrade to GNU shtool 1.5.2 and GNU libtool 1.3.5 + *) Support for DESTDIR installation variable + + Changes between 1.2 and 1.3 (31-Oct-1999 to 19-Feb-2000) + + *) Better detection and support for Unix platform differences + *) More complete support for hard syscall wrapping + *) Memory debugging support via Dmalloc library and --with-dmalloc + *) Added a PTH_CTRL_DUMPSTATE to pth_ctrl() + *) Removed PTH_EVENT_PID and enhanced PTH_EVENT_FUNC + *) First cut for Win32/CygWin support + *) New `make striptease' feature for developers + *) New pth.m4 file for using Pth inside Autoconf based packages + *) New large pthread.pod manual page which contains full Pthread API + *) Fixed numerious memory leaks + *) Numerous bugfixes and cleanups + + Changes between 1.1 and 1.2 (19-Aug-1999 to 31-Oct-1999) + + *) Switched to GNU Lesser General Public License (LGPL) 2.1 + *) Optimized signal mask handling to speed up dispatching + *) Lots of build environment enhancements and bugfixes + *) Support for POSIX socklen_t and nfds_t types in API + *) Allow the compilation even with a strict C++ compiler + *) Enhanced portability to support even more platforms + *) Added config.param facility + *) Enhanced `make test' facility. + + Changes between 1.0 and 1.1 (03-Aug-1999 to 19-Aug-1999) + + *) Fixed and enhanced POSIX semantics for replacement functions + *) Cleaned up source tree + *) Overhauled Autoconf environment + *) Enhanced setjmp/longjmp support + *) Support for SVR4/SUSv2 makecontext(2) mctx variant + *) Barrier synchronization objects + *) Sfio support via special Pth/Sfio discipline + *) Overhauled filedescriptor handling + + Changes between 0.9 and 1.0 (Feb-1999 to 03-Aug-1999) + + *) Added support for readv(2) and writev(2) + *) Added support for poll(2) facility + *) System Call Mapping (soft=#define & hard=syscall) + *) Cleanup support for forking (atfork) + *) Enhanced event handling + *) Added POSIX.1c pthread emulation library + *) New API for manipulating pth_attr_t objects + *) Per-thread signal delivery + diff --git a/PORTING b/PORTING new file mode 100644 index 0000000..f786b5e --- /dev/null +++ b/PORTING @@ -0,0 +1,277 @@ + ____ _ _ + | _ \| |_| |__ ``A good magician never reveals + | |_) | __| '_ \ his secret; the unbelievable trick + | __/| |_| | | | becomes simple and obvious once it is + |_| \__|_| |_| explained. So too with UNIX.'' + + GNU Pth - The GNU Portable Threads + + PORTING + ======= + + SUCCESSFULLY TESTED PLATFORMS + + The Pth package was successfully tested on the following platforms + (and should automatically adjust to other platforms, of course): + + __PLATFORM_ID_________________________ __MACHINE_CONTEXT__ _STACK_ _VERSION_ + i386-unknown-freebsd6.1 | mcsc/sc/mc | down | 2.0.6 + i386-unknown-freebsd5.3 | mcsc/sc/mc | down | 2.0.3 + i386-unknown-freebsd4.10 | sjlj/ssjlj/sas | down | 2.0.1 + i386-unknown-freebsd4.7 | sjlj/ssjlj/sas | down | 2.0b0 + i386-pc-solaris2.8 | mcsc/sc/mc | down | 1.4.1 + i686-gnu-linux-gnu2.2glibc2.2 | sjlj/ssjlj/sas | down | 1.4.1 + i386-pc-sysv4.2uw2.1.2 | mcsc/sc/mc | down | 1.4.1 + alpha-portbld-freebsd4.6.2 | sjlj/ssjlj/sas | down | 1.4.1 + i586-pc-freebsd4.6 | sjlj/ssjlj/sas | down | 1.4.1 + m68k--netbsdelf | sjlj/ssjlj/sas | down | 1.4.1 + alpha-unknown-freebsd4.6 | sjlj/ssjlj/sas | down | 1.4.1 + powerpc-apple-darwin6.1 | sjlj/ssjlj/sas | down | 1.4.1 + powerpc-apple-netbsd1.5.2 | sjlj/ssjlj/sas | down | 1.4.1 + i386-pclocal-interix | sjlj/sjljisc/none | down | 1.4.1 + powerpc-ibm-aix4.3.1.0 | mcsc/sc/mc | down | 1.4.1 + alpha-unknown-netbsd1.5.3. | sjlj/ssjlj/sas | down | 1.4.1 + alphaev56-dec-osf4.0a | mcsc/sc/mc | down | 1.4.1 + i686-redhat-linux-gnu2.2glibc1 | sjlj/ssjlj/sas | down | 1.4.1 + i386-portbld-freebsd4.4 | sjlj/ssjlj/sas | down | 1.4.1 + i686-pc-sco3.2v5.0.6 | sjlj/ssjlj/sas | down | 1.4.1 + i386-portbld-freebsd4.5 | sjlj/ssjlj/sas | down | 1.4.1 + i386-portbld-freebsd4.6 | sjlj/ssjlj/sas | down | 1.4.1 + i686-pc-freebsd4.6 | sjlj/ssjlj/sas | down | 1.4.1 + i686-pc-freebsd4.5 | sjlj/ssjlj/sas | down | 1.4.1 + i386-portbld-freebsd4.7 | sjlj/ssjlj/sas | down | 1.4.1 + rs6000-ibm-aix5.1.0.0 | mcsc/sc/mc | down | 1.4.1 + i386-unknown-gnu0.2 | sjlj/sjljlx/none | down | 1.4.1 + sparc--netbsdelf | sjlj/ssjlj/sas | down | 1.4.1 + sparc-sun-solaris2.9 | mcsc/sc/mc | down | 1.4.1 + sparc-unknown-netbsd1.5.2 | sjlj/ssjlj/sas | down | 1.4.1 + sparc-unknown-netbsd1.6 | sjlj/ssjlj/sas | down | 1.4.1 + i586-pc-freebsd4.5 | sjlj/ssjlj/sas | down | 1.4.1 + vax--netbsdelf | sjlj/ssjlj/sas | down | 1.4.1 + i386-unknown-netbsd1.5.2 | sjlj/ssjlj/sas | down | 1.4.1 + i386-unknown-netbsd1.5ZA | sjlj/ssjlj/sas | down | 1.4.1 + i386-unknown-netbsd1.6 | sjlj/ssjlj/sas | down | 1.4.1 + i386-unknown-netbsd1.6. | sjlj/ssjlj/sas | down | 1.4.1 + i386--netbsdelf | sjlj/ssjlj/sas | down | 1.4.1 + i686-debian-linux-gnu2.4glibc2.1 | sjlj/ssjlj/sas | down | 1.4.1 + i586-debian-linux-gnu2.2glibs2.2 | mcsc/sc/mc | down | 1.4.1 + i586-gnu-linux-gnu2.4glibc2.2 | mcsc/sc/mc | down | 1.4.1 + i586-sco-sysv5 | mcsc/sc/mc | down | 1.4.1 + i586-redhat-linux-gnu2.4glibc2.3 | mcsc/sc/mc | down | 1.4.1 + i386-pc-freebsd4.0-gnu | mcsc/sc/mc | down | 1.4.1 + i386-pc-freebsd4.3 | sjlj/ssjlj/sas | down | 1.4.1 + i386-pc-freebsd4.5 | sjlj/ssjlj/sas | down | 1.4.1 + i686-suse-linux-gnu2.4glibc2.2 | mcsc/sc/mc | down | 1.4.1 + m68k--netbsd | sjlj/ssjlj/sas | down | 1.4.1 + i686-gnu-linux-gnu2.4glibc2.2 | mcsc/sc/mc | down | 1.4.1 + i386-pc-sco3.2v5.0.6 | sjlj/ssjlj/sas | down | 1.4.1 + i386--freebsd4.4 | sjlj/ssjlj/sas | down | 1.4.0 + i386--freebsd4.5 | sjlj/ssjlj/sas | down | 1.4.0 + powerpc-yellowdog-linux-gnu2.4glibc2. | sjlj/ssjlj/sas | down | 1.4.0 + i586-pc-cygwin | sjlj/sjljw32/none | down | 1.4.0 + i586-redhat-linux-gnu2.4glibc2.2 | mcsc/sc/mc | down | 1.4.0 + mips-debian-linux-gnu2.4glibc2.2 | sjlj/ssjlj/sas | down | 1.4.0 + i386-portbld-freebsd4.3 | sjlj/ssjlj/sas | down | 1.4.0 + powerpc-yellowdog-linux-gnu2.4glibc2. | sjlj/ssjlj/sas | down | 1.4.0 + powerpc-apple-darwin6.0 | sjlj/ssjlj/sas | down | 1.4.0 + i686-debian-linux-gnu2.2glibc2.2 | mcsc/sc/mc | down | 1.4.0 + i386-unknown-openbsd3.0 | sjlj/ssjlj/sas | down | 1.4.0 + sparc-unknown-openbsd2.9 | sjlj/ssjlj/sas | down | 1.4.0 + arm-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.4.0 + i686-debian-linux-gnu2.4glibc2.2 | mcsc/sc/mc | down | 1.4.0 + i586-debian-linux-gnu2.2glibc2.2 | sjlj/ssjlj/sas | down | 1.4.0 + i686-pc-freebsd4.3 | sjlj/ssjlj/sas | down | 1.4a4 + i686-pc-freebsd4.1 | sjlj/ssjlj/sas | down | 1.4a3 + i386-unknown-netbsd1.4.2 | sjlj/ssjlj/sas | down | 1.4a2 + i686-pc-freebsd3.5 | sjlj/ssjlj/sas | down | 1.4a2 + alpha-unknown-netbsd1.5.1 | sjlj/ssjlj/sas | down | 1.4a2 + hppa2.0w-hp-hpux11.00 | mcsc/sc/mc | up | 1.4a1 + i586-redhat-linux-gnu2.2glibc1 | sjlj/ssjlj/sas | down | 1.3.7 + i686-redhat-linux-gnu2.4glibc2.2 | sjlj/ssjlj/sas | down | 1.3.7 + i686-redhat-linux-gnu2.2glibc2.2 | sjlj/ssjlj/sas | down | 1.3.7 + i586-gnu-linux-gnu2.4glibc2.1 | sjlj/ssjlj/sas | down | 1.3.7 + i386-unknown-openbsd2.7 | sjlj/ssjlj/sas | down | 1.3.7 + i586-suse-linux-gnu2.2glibc2.0 | sjlj/sjljlx/none | down | 1.3.7 + i386-unknown-openbsd2.8 | sjlj/ssjlj/sas | down | 1.3.7 + i486-gnu-linux-gnu2.0glibc1 | sjlj/sjljlx/none | down | 1.3.7 + m68k-apple-netbsd1.3.3 | sjlj/ssjlj/sas | down | 1.3.7 + mips-compaq-nonstopux | sjlj/ssjlj/sas | down | 1.3.7 + mips-dec-netbsd1.5 | sjlj/ssjlj/sas | down | 1.3.7 + hppa1.1-hp-hpux10.10 | sjlj/ssjlj/sas | up | 1.3.7 + i586-pc-freebsd4.1 | sjlj/ssjlj/sas | down | 1.3.7 + i686-pc-freebsd4.2 | sjlj/ssjlj/sas | down | 1.3.7 + mips-sgi-irix6.3 | mcsc/sc/mc | down | 1.3.7 + i686-pc-freebsd4.1.1 | sjlj/ssjlj/sas | down | 1.3.7 + powerpc-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.7 + i386-pc-bsdi4.1 | sjlj/ssjlj/sas | down | 1.3.7 + i386-pc-freebsd3.2 | sjlj/ssjlj/sas | down | 1.3.7 + rs6000-ibm-aix4.2.0.0 | mcsc/sc/mc | down | 1.3.7 + sparc--netbsd | sjlj/ssjlj/sas | down | 1.3.7 + i586-redhat-linux-gnu2.2glibc2.2 | sjlj/ssjlj/sas | down | 1.3.7 + i686-pc-cygwin | sjlj/sjljw32/none | down | 1.3.6 + i586-debian-linux-gnu2.4glibc2.1 | sjlj/ssjlj/sas | down | 1.3.6 + powerpc-apple-netbsd1.4.2 | sjlj/ssjlj/sas | down | 1.3.5 + alpha-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.5 + alpha-unknown-freebsd5.0 | sjlj/ssjlj/sas | down | 1.3.5 + i486-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.5 + powerpc-debian-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.5 + powerpc-ibm-aix4.3.3.0 | mcsc/sc/mc | down | 1.3.5 + i686-pc-sco3.2v5.0.4 | sjlj/ssjlj/sas | down | 1.3.5 + alphaev6-dec-osf4.0f | mcsc/sc/mc | down | 1.3.5 + i686-gnu-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.5 + rs6000-ibm-aix4.1.5.0 | sjlj/ssjlj/ss | down | 1.3.5 + rs6000-ibm-aix4.3.3.0 | mcsc/sc/mc | down | 1.3.5 + i686-pc-freebsd3.2 | sjlj/ssjlj/sas | down | 1.3.5 + i386-pc-interix | sjlj/sjljisc/none | down | 1.3.5 + i386-unknown-netbsd1.4T | sjlj/ssjlj/sas | down | 1.3.5 + i386-pc-sysv5uw7.1.0 | mcsc/sc/mc | down | 1.3.5 + m68k-cbm-amigaos | sjlj/ssjlj/ss | down | 1.3.5 + i686-gnu-linux-gnu2.0glibc1 | sjlj/sjljlx/none | down | 1.3.5 + sparc64-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.5 + mipsel-unknown-netbsd1.4.2 | sjlj/ssjlj/sas | down | 1.3.5 + i686-gnu-linux-gnu2.2glibc1 | sjlj/sjljlx/none | down | 1.3.5 + i686-debian-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.5 + alphaev56-dec-osf4.0e | mcsc/sc/mc | down | 1.3.4 + i586-pc-freebsd5.0 | sjlj/ssjlj/sas | down | 1.3.4 + i686-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.3 + i686-va-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.3 + hppa1.1-hp-hpux10.01 | sjlj/ssjlj/ss | up | 1.3.3 + sparc-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.3 + i386-pc-bsdi4.0 | sjlj/ssjlj/sas | down | 1.3.3 + i586-pc-freebsd3.1 | sjlj/ssjlj/sas | down | 1.3.3 + i586-gnu-linux-gnu2.2glibc2.0 | sjlj/sjljlx/none | down | 1.3.3 + alpha-dec-osf4.0e | mcsc/sc/mc | down | 1.3.3 + i386-pc-sysv5uw7.1.1 | mcsc/sc/mc | down | 1.3.3 + i586-debian-linux-gnu2.3glibc2.1 | sjlj/ssjlj/sas | down | 1.3.3 + powerpc-ibm-aix4.1.3.0 | sjlj/ssjlj/ss | down | 1.3.3 + powerpc-apple-macosX | sjlj/ssjlj/sas | down | 1.3.2 + i586-suse-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.2 + powerpc-unknown-netbsd | sjlj/ssjlj/sas | down | 1.3.2 + sparc-sun-solaris2.8 | mcsc/sc/mc | down | 1.3.2 + alpha-unknown-netbsd1.4.1 | sjlj/ssjlj/sas | down | 1.3.2 + i686-suse-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.2 + i586-pc-sco3.2v5.0.2 | sjlj/ssjlj/sas | down | 1.3.2 + i586-redhat-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.1 + i586-gnu-linux-gnu2.0glibc1 | sjlj/sjljlx/none | down | 1.3.1 + i686-suse-linux-gnu2.2glibc2.0 | sjlj/sjljlx/none | down | 1.3.1 + hppa1.1-stratus-sysv4 | mcsc/sc/mc | up | 1.3.1 + i586-gnu-linux-gnu2.2glibc1 | sjlj/sjljlx/none | down | 1.3.1 + i686-pc-freebsd4.0 | sjlj/ssjlj/sas | down | 1.3.0 + i686-slackware-linux-gnu | sjlj/ssjlj/sas | down | 1.3.0 + alpha-unknown-freebsd4.0 | sjlj/ssjlj/sas | down | 1.3.0 + hppa1.1-hp-hpux10.20 | sjlj/ssjlj/sas | up | 1.3.0 + hppa2.0-hp-hpux10.20 | sjlj/ssjlj/sas | up | 1.3.0 + i386-pc-sysv4.2uw2.1.3 | mcsc/sc/mc | down | 1.3.0 + i386-pc-sysv5uw7 | mcsc/sc/mc | down | 1.3.0 + sparc-sun-solaris2.6 | mcsc/sc/mc | down | 1.3.0 + i386-unknown-netbsd1.4 | sjlj/ssjlj/sas | down | 1.3.0 + i386-unknown-netbsd1.4.1 | sjlj/ssjlj/sas | down | 1.3.0 + i586-debian-linux-gnu2.2glibc2.0 | sjlj/sjljlx/none | down | 1.3.0 + i586-gnu-linux-gnu2.2glibc2.1 | sjlj/ssjlj/sas | down | 1.3.0 + i586-redhat-linux-gnu2.0glibc2.0 | sjlj/sjljlx/none | down | 1.3.0 + i686-pc-freebsd3.1 | sjlj/ssjlj/sas | down | 1.3.0 + i686-pc-freebsd3.4 | sjlj/ssjlj/sas | down | 1.3.0 + i586-pc-freebsd4.0 | sjlj/ssjlj/sas | down | 1.3b2 + i586-pc-freebsd3.3 | sjlj/ssjlj/sas | down | 1.3a5 + m68k-cbm-netbsd1.4.1 | sjlj/ssjlj/sas | down | 1.3a5 + i686-redhat-linux-gnu2.3glibc2.0 | sjlj/sjljlx/none | down | 1.3a4 + i386--netbsd | sjlj/ssjlj/sas | down | 1.3a2 + i386-pc-freebsd3.4 | sjlj/ssjlj/sas | down | 1.3a2 + i586-redhat-linux-gnu2.2glibc2.0 | sjlj/sjljlx/none | down | 1.3a2 + i686-redhat-linux-gnu2.2glibc2.0 | sjlj/sjljlx/none | down | 1.3a1 + i386-redhat-linux-gnu | sjlj/sjljlx/none | down | 1.3a1 + sparc-unknown-linux-gnu | sjlj/ssjlj/sas | down | 1.2.3 + hppa1.1-hp-hpux11.00 | mcsc/sc/mc | up | 1.2.3 + mips-sni-sysv4 | mcsc/sc/mc | down | 1.2.3 + i586-pc-freebsd3.4 | sjlj/ssjlj/sas | down | 1.2.2 + mips-sgi-irix5.3 | sjlj/ssjlj/sas | down | 1.2.2 + i386-pc-sco3.2v5.0.5 | sjlj/ssjlj/sas | down | 1.2.2 + powerpc-apple-netbsd1.4.1 | sjlj/ssjlj/sas | down | 1.2.1 + i586-ncr-sysv4.3.03 | mcsc/sc/mc | down | 1.2.1 + i486-pc-linux-gnulibc1 | sjlj/sjljlx/none | down | 1.2.1 + i486-pc-linux-gnu | sjlj/sjljlx/none | down | 1.2.1 + i386-pc-freebsd3.3 | sjlj/ssjlj/sas | down | 1.2.1 + i486-pc-freebsd3.3 | sjlj/ssjlj/sas | down | 1.2.1 + powerpc-ibm-aix4.3.2.0 | mcsc/sc/mc | down | 1.2.1 + m68k-unknown-amigaos | sjlj/ssjlj/ss | down | 1.2.1 + i386-unknown-openbsd2.6 | sjlj/ssjlj/sas | down | 1.2.1 + hppa2.0n-hp-hpux11.00 | mcsc/sc/mc | up | 1.2.1 + i686-pc-sco3.2v5.0.5 | sjlj/ssjlj/sas | down | 1.2.1 + alpha-dec-osf5.0 | mcsc/sc/mc | down | 1.2.1 + alpha-dec-osf4.0f | mcsc/sc/mc | down | 1.2.1 + i586-pc-linux-gnu | sjlj/sjljlx/none | down | 1.2.1 + i586-pc-freebsd3.2 | sjlj/ssjlj/sas | down | 1.2.0 + i586-pc-linux-gnulibc1 | sjlj/sjljlx/none | down | 1.2.0 + m68k-hp-hpux9.10 | sjlj/ssjlj/ss | down | 1.2.0 + alphaev56-dec-osf4.0f | mcsc/sc/mc | down | 1.2.0 + sparc-sun-solaris2.5.1 | mcsc/sc/mc | down | 1.2.0 + sparc-sun-solaris2.7 | mcsc/sc/mc | down | 1.2.0 + powerpc-unknown-linux-gnu | sjls/ssjlj/sas | down | 1.2.0 + sparc-unknown-openbsd2.6 | sjlj/ssjlj/sas | down | 1.2.0 + alphaev6-unknown-linux-gnu | sjlj/ssjlj/sas | down | 1.2.0 + alphaev6-dec-osf5.0 | mcsc/sc/mc | down | 1.2.0 + i686-pc-linux-gnu | sjlj/sjljlx/none | down | 1.2.0 + i686-pc-freebsd3.3 | sjlj/ssjlj/sas | down | 1.2.0 + i586-pc-sco3.2v5.0.4 | sjlj/ssjlj/sas | down | 1.2.0 + i686-pc-linux-gnulibc1 | sjlj/sjljlx/none | down | 1.2.0 + alphaev56-unknown-linux-gnu | sjlj/ssjlj/sas | down | 1.2.0 + armv4l-unknown-linux-gnu | sjlj/ssjlj/sas | down | 1.2b8 + sparc-unknown-netbsd1.4.1 | sjlj/ssjlj/sas | down | 1.2b8 + alphaev56-dec-osf4.0d | mcsc/sc/mc | down | 1.2b6 + m68k-apple-netbsd1.4.1 | sjlj/ssjlj/sas | down | 1.2b5 + i386-unknown-openbsd2.5 | sjlj/ssjlj/sas | down | 1.2b5 + powerpc-apple-rhapsody5.5 | sjlj/ssjlj/sas | down | 1.2b3 + i386-pc-isc4.0 | sjlj/sjljisc/none | down | 1.2b2 + mips-sgi-irix6.5 | mcsc/sc/mc | down | 1.2b1 + i386-pc-sysv4.2uw2.1 | mcsc/sc/mc | down | 1.1.6 + sparc-sun-sunos4.1.4 | sjlj/ssjlj/ss | down | 1.1.6 + powerpc-ibm-aix4.1.4.0 | mcsc/sc/mc | down | 1.1.6 + powerpc-ibm-aix4.2.1.0 | mcsc/sc/mc | down | 1.1.6 + rs6000-ibm-aix4.3.2.0 | mcsc/sc/mc | down | 1.1.5 + rs6000-ibm-aix4.2.1.0 | mcsc/sc/mc | down | 1.1.5 + i386-unknown-netbsd1.3.3 | sjlj/ssjlj/sas | down | 1.1.5 + powerpc-ibm-aix4.1.5.0 | mcsc/sc/mc | down | 1.1.5 + sparc-sun-sunos4.1.3_U1 | sjlj/ssjlj/ss | down | 1.1.4 + sparc-sun-solaris2.5 | mcsc/sc/mc | down | 1.1.4 + alpha-unknown-netbsd1.3.3 | sjlj/ssjlj/sas | down | 1.1.4 + + HINTS FOR PORTING TO NEW PLATFORMS + + In case you're not able to use Pth on a new and esoteric platform, + here are a few hints. + + Pth has only one part which perhaps has to be ported to new platforms: the + machine context initialization, i.e. the function pth_mctx_set() in + pth_mctx.c. The exercise is to write a pth_mctx_set() function which + initializes a `jmp_buf' (see setjmp(3)) with a given function and stack, so + when the next longjmp(3) is done on this `jmp_buf', the function starts + executing on the given stack. + + By default, Pth uses a very tricky sigstack/sigaltstack() based approach for + establishing this `jmp_buf' which is mostly portable to all major Unix + platforms which support the involved POSIX functions (see rse-pmt.ps for a + detailed description of the trick). So the chance is very high that this + approach also works for forthcoming platforms and no real porting is + required. + + When this approach should not work (for instance brain-dead achient + GNU/Linux versions have a dummy sigstack/sigaltstack(), so we've no chance + this way), then you've to provide an alternative implementation. This + usually is done be fiddling around with the ingredients of a `jmp_buf' + structure. For this look inside your /usr/include/setjmp.h (plus files it + includes) and there especially for things like _pc or JB_PC (the program + counter) and _sp or JB_SP (the stack pointer). Then write an alternative + pth_mctx_set() function in pth_mctx.c. + + Currently, as mentioned, Pth requires such an alternative only under + GNU/Linux where sigstack/sigaltstack() are dummy functions. Look at the + GNU/Linux pth_mctx_set() variant in pth_mctx.c to get an impression what + type of `jmp_buf' fiddling you perhaps have to do for esoteric platforms. + Don't be confused by the fact that such specialized pth_mctx_set() functions + are just a few lines long while the standard function is very large. That's + all just needed for maximum portability. The goal nevertheless only is to + initialize a `jmp_buf' with PC and SP. That's all... + + Additionally see the INSTALL document for the --enable-mctx-XXX options. + These can be used to easily try out mctx combinations on a platform, too. + diff --git a/README b/README new file mode 100644 index 0000000..aa73151 --- /dev/null +++ b/README @@ -0,0 +1,86 @@ + ____ _ _ + | _ \| |_| |__ + | |_) | __| '_ \ ``Only those who attempt + | __/| |_| | | | the absurd can achieve + |_| \__|_| |_| the impossible.'' + + GNU Pth - The GNU Portable Threads + Version 2.0.7 (08-Jun-2006) + + ABSTRACT + + Pth is a very portable POSIX/ANSI-C based library for Unix platforms + which provides non-preemptive priority-based scheduling for multiple + threads of execution (aka `multithreading') inside event-driven + applications. All threads run in the same address space of the server + application, but each thread has its own individual program-counter, + run-time stack, signal mask and errno variable. + + The thread scheduling itself is done in a cooperative way, i.e., the + threads are managed by a priority- and event-based non-preemptive + scheduler. The intention is, that this way one can achieve better + portability and run-time performance than with preemptive scheduling. + The event facility allows threads to wait until various types of + events occur, including pending I/O on filedescriptors, asynchronous + signals, elapsed timers, pending I/O on message ports, thread and + process termination, and even customized callback functions. + + Additionally Pth provides an optional emulation API for POSIX.1c + threads (`Pthreads') which can be used for backward compatibility to + existing multithreaded applications. + + Finally, Pth guarranties its fixed set of API functionality on + all platforms, i.e., functions like pth_poll(3), pth_readv(3) or + pth_writev(3) are always available, even if the particular underlaying + platform does not actually support their functionality (through the + system calls poll(2), readv(2), writev(2), etc). + + Although Pth is very feature-rich, it is a rather small threading + library. It consists only of approximately 7,000 line (or 300 KB) of + ANSI C code which are auto-configured with approximately 400 lines (or + 60 KB) of Autoconf/m4 macros and which are documented by approximately + 3,000 lines (or 150 KB) of documentation. Additionally the sources + are documented with approximately 3,600 additional lines of comments. + As a result, the whole source tree is just about 1.5 MB in size and + fits into a small tarball less than 350 KB in size. This allows Pth to + fit very well even into the source tree of other applications without + bloating it up very much. + + Pth was successfully tested on FreeBSD, NetBSD, OpenBSD, BSDI, + GNU/Linux, Solaris, HPUX, Tru64 (OSF/1), AIX, IRIX, UnixWare, SCO + OpenServer, SINIX, ReliantUNIX, ISC, AmigaOS, Rhapsody (MacOS X), FTX, + AUX and Win32/Cygwin. And it should should automatically adjust itself + to remaining Unix platforms, too. + + COPYRIGHT AND LICENSE + + Copyright (c) 1999-2006 Ralf S. Engelschall + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library (see file COPYING); if not, write + to the Free Software Foundation, Inc., 59 Temple Place, Suite + 330, Boston, MA 02111-1307 USA, or contact Ralf S. Engelschall + . + + HOME AND DOCUMENTATION + + The documentation and latest release can be found on + + o OSSP: http://www.ossp.org/pkg/lib/pth/ + o OSSP: ftp://ftp.ossp.org/pkg/lib/pth/ + o GNU: http://www.gnu.org/software/pth/ + o GNU: ftp://ftp.gnu.org/gnu/pth/ + + Ralf S. Engelschall + rse@engelschall.com + www.engelschall.com diff --git a/SUPPORT b/SUPPORT new file mode 100644 index 0000000..54810a8 --- /dev/null +++ b/SUPPORT @@ -0,0 +1,48 @@ + ____ _ _ + | _ \| |_| |__ ``Programming is like sex - + | |_) | __| '_ \ one mistake and you have + | __/| |_| | | | to support it for the rest + |_| \__|_| |_| of your life.'' + + GNU Pth - The GNU Portable Threads + + SUPPORT + ======= + + If you want to discuss multithreading issues not directly related to + GNU Pth, post to the USENET newsgroup comp.programming.threads. There + you can reach mostly all authorities of multithreading. + + In case you have problems directly related to GNU Pth or you + need technical support for programming with GNU Pth, you can + send a bug report to bug-pth@gnu.org or alternatively write to + the GNU Pth support mailing list pth-users@gnu.org. There you + can currently (as of August 2000) reach about 110 Pth users from + around the world. Old pth-users@gnu.org postings are archived at + http://www.mail-archive.com/pth-users@gnu.org/. + + Although the author tries hard to give the best support which is + possible in his remaining free time, there cannot be any guarranty + for help, because the author is a very busy hacker. So in your own + interest: If you need help in case of a hard problems, keep your + mail _VERY SHORT_ and _CONCISE_ and clearly mention your operating + system, your way you have configured and built Pth and provide a + way to _EASILY_ reproduce the problem. Don't die of laughter here + - you would be terrified if you would know how much people of the + authors software packages want help, but do not even mention the + actual problem :-( + + Additionally in case of `segfaults' or other heavy problems, it is + important that you provide the author a stack frame backtrace (see + gdb's `bt' command) to allow the author to locate the problem. Without + this information it is usually not possible to help you in case of + such problems. + + Please understand, that you're not the only user of Pth and that Pth + is not the only software package written by the author. So it is + always appreciated that you first investigate yourself in solving the + problem. If your problem then still remains, follow the above hints + and contact the author. But please also understand, that application + problems related to programming with Pth and the multithreaded + paradigm cannot always be treated as real `problems'. + diff --git a/TESTS b/TESTS new file mode 100644 index 0000000..b79e8b6 --- /dev/null +++ b/TESTS @@ -0,0 +1,160 @@ + ____ _ _ + | _ \| |_| |__ + | |_) | __| '_ \ ``It doesn't need to be + | __/| |_| | | | tested, because it works.'' + |_| \__|_| |_| -- Richard Holloway + + GNU Pth - The GNU Portable Threads + + TESTS + ===== + + GNU Pth was successfully tested with the following real-world + applications (which are not just trivial sample applications unlike + the shipped test_xxx programs): + + o Apache (webserver) + o MySQL (relational database system) + o OpenLDAP (LDAP toolkit) + o pidentd (IDENT daemon) + o Perl (scripting language) + o Python (scripting language) + o gFTP (FTP client) + o NakenChat (chat server) + + Details of the tests follow: + + Package: Apache + Version: 2.0-dev + URL: http://www.apache.org/ + Pth: 1.2b1 [--enable-pthread --disable-shared --enable-syscall-soft] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 30-Aug-1999 + Config: CFLAGS="`pthread-config --cflags` \ + -DPTHREAD_EVERYWHERE \ + -DNO_SERIALIZED_ACCEPT" + LDFLAGS="`pthread-config --ldflags`" + LIBS="`pthread-config --libs`" + --set-rule=MPM_METHOD:dexter + Comment: Apache 2.0-dev is a developer version, `dexter' + is a MPM (multi process model) module based on Pthreads. + The server served around 1000 requests per second. + + Package: MySQL + Version: 3.22.25 + URL: http://www.mysql.com/ + Pth: 1.2b1 [--enable-pthread --disable-shared --enable-syscall-soft] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 30-Aug-1999 + Config: CC=egcc CXX=eg++ \ + CFLAGS="`pthread-config --cflags`" \ + CXXFLAGS="`pthread-config --cflags`" \ + LDFLAGS="`pthread-config --ldflags`" \ + ./configure \ + --prefix=/tmp/mysql \ + --without-mit-pthreads \ + --with-pthread \ + --with-named-thread-libs="`pthread-config --libs`" + Comment: MySQL seems to work fine with Pth. I was able to run + the tests from the INSTALL/README documents, i.e. a create + table, a few inserts and a select and the server served them + fine. + + Package: OpenLDAP + Version: 2.0-dev + URL: http://www.openldap.org/ + Pth: 1.2b1 [--enable-pthread --disable-shared --enable-syscall-soft] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 01-Sep-1999 + Config: CPPFLAGS="`pth-config --cflags`" \ + LDFLAGS="`pth-config --ldflags`" \ + ./configure --prefix=/tmp/openldap \ + --with-threads=pth + Comments: Still not tested under runtime, just compiled the beast. + Interesting is that OpenLDAP has native Pth support. + + Package: pidentd + Version: 3.1a14 + URL: ftp://ftp.lysator.liu.se/pub/unix/ident/servers/ + Pth: 1.2b1 [--enable-pthread --disable-shared --enable-syscall-soft] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 30-Aug-1999 + Config: CFLAGS="`pthread-config --cflags`" \ + LDFLAGS="`pthread-config --ldflags`" \ + LIBS="`pthread-config --libs`" \ + ./configure \ + --prefix=/tmp/pindent \ + --with-threads + Comment: I had to change ``CC="$CC -pthread"'' in `configure' with + ``: CC="$CC -pthread"'' in order to avoid the use uthreads under + FreeBSD. + + Package: Perl + Version: 5.005_03 + URL: http://www.perl.com/ + Pth: 1.2b1 [--enable-pthread --disable-shared + --enable-syscall-soft --enable-syscall-hard] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 02-Sep-1999 + Config: ./Configure \ + -Dusethreads -des \ + -Dccflags="`pthread-config --cflags`" \ + -Dlibs="`pthread-config --ldflags --libs` -lm" \ + -Dprefix=/tmp/perl + Comment: I've tried all tests ext/Thread/*.t. All worked fine, + except for the io.t. Even with Pth's --enable-syscall-hard + Perl seems to use direct I/O for the facility. So + the Pth support for Perl is still not 100%. But perhaps + one can make it complete by using PerlIO abstraction layer + (either directly to use pth_read/write or via Sfio and + pth_sfdisc)? Additionally I had to deactivate the -pthread + in hints/freebsd to get rid of uthread under FreeBSD. + + Package: Python + Version: 1.5.2 + URL: http://www.python.org/ + Pth: 1.2b1 [--enable-pthread --disable-shared --enable-syscall-soft] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 01-Sep-1999 + Config: CC="cc `pthread-config --cflags`" \ + LDFLAGS="`pthread-config --ldflags`" \ + LIBS="`pthread-config --ldflags --libs`" \ + ./configure \ + --prefix=/tmp/python \ + --with-thread + Comment: The configure stuff of Python was a little bit strange + (using CFLAGS or CPPFLAGS didn't work), but except for this + Python worked fine. It even passed its "make test" and there + also the test_thread. Seems to work fine with Pth. + + Package: gFTP + Version: 2.0.5a + URL: http://gftp.seul.org/ + Pth: 1.2b6 [--enable-pthread --disable-shared --enable-syscall-soft] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 04-Oct-1999 + Config: CC="cc `pthread-config --cflags`" \ + LDFLAGS="`pthread-config --ldflags` `pthread-config --ldflags --libs`" \ + ./configure \ + --prefix=/tmp/gftp + Comment: none + + Package: NakenChat + Version: 1.10 + URL: http://home.i1.net/~naken/nakenchat/ + Pth: 1.2b7 [--enable-pthread] + Platform: i686-pc-freebsd3.1 + Tester: Ralf S. Engelschall + Date: 19-Oct-1999 + Config: cc `pthread-config --cflags` \ + -onakenchat nakenchat.c \ + `pthread-config --ldflags --libs` + Comment: none + diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..ba17d37 --- /dev/null +++ b/THANKS @@ -0,0 +1,119 @@ + + | _ \| |_| |__ ``There is enough for the need of + | |_) | __| '_ \ everyone in this world, but not + | __/| |_| | | | for the greed of everyone.'' + |_| \__|_| |_| -- Mahatma Gandhi + + GNU Pth - The GNU Portable Threads + + THANKS + ====== + + Credit has to be given to the following people who contributed ideas, + bugfixes, hints, gave platform feedback, etc. (in alphabetical order): + + o Steve Alstrin + o Jens Andersen + o Robert Anderson + o J.David Anglin + o Dmitry A. Antipov + o Bill Apt + o James T. Beaupre + o Felix Berger + o Paolo Bonzini + o Raphael Bossek + o Stefan Brantschen + o Edwin Brown + o Dan Buckler + o Mark Burton + o Archie Cobbs + o Jon Cook + o Philippe Defert + o David Dureau + o Lars Eilebrecht + o Rafael Ávila de Espíndola + o Jason Evans + o Alex Fiori + o Flux + o Thomas Foks + o Emanuele Fornara + o Didier Fort + o Daniel Richard G. + o Artem Gr + o Ed Grether + o Georg C. F. Greve + o Bruno Haible + o Eric Hanchrow + o Ben Harris + o Tim Harris + o B. Douglas Hilton + o Jarkko Hietaniemi + o David Hill + o Michael Holzapfel + o Sam Horwitz + o Roman Hodek + o Thomas Hoffmann + o Samuel A Horwitz + o Barnett Hsu + o Nick Hudson + o Andrew Hunter + o Stephane Loeuillet + o Takashi Ishihara + o Jim Jagielski + o Jeremie + o Dmitry E. Kiselyov + o Thomas Klausner + o Martin Kraemer + o Christian Kuhtz + o Kriton Kyrimis + o M. Lavasani + o Chris Leishman + o Felix von Leitner + o Mostyn Lewis + o Sherwin Levinson + o Lubos Lunak + o John A. Maier + o David Masterson + o Xhemil Meco + o Aaron Metzger + o Igor A. Minyukoff + o Matthew Mondor + o Dr. Andreas Mueller + o Graham Nash + o Eric Newton + o Sami Niemi + o Joseph Wayne Norton + o Alexandre Oliva + o Giwon On + o Takeshi OTOFUJI + o Kent Overstreet + o Staehli Patrik + o Pete + o Michael Petuschak + o Tomas Pihl + o Rob Quinn + o Matthew Quon + o Peter Reich + o Brandon Reynolds + o Phil Richards + o James Robinson + o David Ronis + o Keith Rose + o Michele Satriani + o Jonathan Schilling + o Stefan Schippers + o David W. Schuler + o Peter Simons + o Robert S. Tau + o Sebastian + o Anton Umnikov + o Michael Schloh v. Bennewitz + o David Scott Urban + o Laurent Vaucher + o Martin Vernard + o Vinu V + o Olaf Wasmuth + o Chia-Hsing Yu + + ...and all other Pth users who gave me feedback but I've forgot... + diff --git a/USERS b/USERS new file mode 100644 index 0000000..aa69d78 --- /dev/null +++ b/USERS @@ -0,0 +1,32 @@ + ____ _ _ + | _ \| |_| |_ + | |_) | __| '_ \ + | __/| |_| | | | ``DejaGNU: The strong feeling that there + |_| \__|_| |_| is already a GNU-tool for your problem.'' + + GNU Pth - The GNU Portable Threads + + USERS + ===== + + This is a list of software packages known to utilize GNU Pth. + If you know more, please drop pth-users@gnu.org a quick note. Thanks. + + __Used API__ + Package_____ Version____ pth pthread _URL______________________________ + OpenLDAP 2.0-dev yes yes http://www.openldap.org/ + Jabber 0.9 yes yes http://www.jabber.org/ + PHP 4.0b4 yes yes http://www.php.net/ + NewKRN 0.1 yes no http://ultra7.unl.edu.ar/newkrn/ + LIQC 0.76 no yes http://www.licq.com/ + MRT 2.2.1 no yes http://www.mrtd.net/ + Apache 2.0-dev no yes http://www.apache.org/ + MySQL 3.22.32 no yes http://www.mysql.com/ + pidentd 3.1a14 no yes ftp://ftp.lysator.liu.se/pub/unix/ident/servers/ + Perl 5.005_03 no yes http://www.perl.com/ + Python 1.5.2 no yes http://www.python.org/ + gFTP 2.0.5a no yes http://gftp.seul.org/ + NakenChat 1.10 no yes http://home.i1.net/~naken/nakenchat/ + APE 1.1.3 no yes http://www.voxilla.org/projects/projape.html + Threads 2.0 no yes http://user.tninet.se/~dpn659b/threads.html + diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..3f4fe7b --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1629 @@ +dnl ## +dnl ## GNU Pth - The GNU Portable Threads +dnl ## Copyright (c) 1999-2006 Ralf S. Engelschall +dnl ## +dnl ## This file is part of GNU Pth, a non-preemptive thread scheduling +dnl ## library which can be found at http://www.gnu.org/software/pth/. +dnl ## +dnl ## This library is free software; you can redistribute it and/or +dnl ## modify it under the terms of the GNU Lesser General Public +dnl ## License as published by the Free Software Foundation; either +dnl ## version 2.1 of the License, or (at your option) any later version. +dnl ## +dnl ## This library is distributed in the hope that it will be useful, +dnl ## but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl ## Lesser General Public License for more details. +dnl ## +dnl ## You should have received a copy of the GNU Lesser General Public +dnl ## License along with this library; if not, write to the Free Software +dnl ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 +dnl ## USA, or contact Ralf S. Engelschall . +dnl ## +dnl ## aclocal.m4: Pth Autoconf macros +dnl ## + dnl # ``"Reuse an expert's code" is the right + dnl # advice for most people. But it's a useless + dnl # advice for the experts writing the code + dnl # in the first place.' + dnl # -- Dan J. Bernstein + +dnl ## +dnl ## Display Configuration Headers +dnl ## +dnl ## configure.ac: +dnl ## AC_MSG_PART() +dnl ## + +m4_define(AC_MSG_PART,[dnl +if test ".$enable_subdir" != .yes; then + AC_MSG_RESULT() + AC_MSG_RESULT(${TB}$1:${TN}) +fi +])dnl + +dnl ## +dnl ## Display a message under --verbose +dnl ## +dnl ## configure.ac: +dnl ## AC_MSG_VERBOSE() +dnl ## + +m4_define(AC_MSG_VERBOSE,[dnl +if test ".$verbose" = .yes; then + AC_MSG_RESULT([ $1]) +fi +]) + +dnl ## +dnl ## Do not display message for a command +dnl ## +dnl ## configure.ac: +dnl ## AC_MSG_SILENT(...) +dnl ## + +m4_define(AC_FD_TMP, 9) +m4_define(AC_MSG_SILENT,[dnl +exec AC_FD_TMP>&AC_FD_MSG AC_FD_MSG>/dev/null +$1 +exec AC_FD_MSG>&AC_FD_TMP AC_FD_TMP>&- +]) + +dnl ## +dnl ## Perform something only once +dnl ## +dnl ## configure.ac: +dnl ## AC_ONCE() +dnl ## + +m4_define(AC_ONCE,[ +ifelse(ac_once_$1, already_done, ,[ + m4_define(ac_once_$1, already_done) + $2 +])dnl +]) + +dnl ## +dnl ## Support for $(S) +dnl ## +dnl ## configure.ac: +dnl ## AC_SRCDIR_PREFIX() +dnl ## + +AC_DEFUN(AC_SRCDIR_PREFIX,[ +ac_prog=[$]0 +changequote(, )dnl +ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` +changequote([, ])dnl +if test ".$ac_srcdir" = ".$ac_prog"; then + ac_srcdir="" +elif test "x$ac_srcdir" = "x."; then + ac_srcdir="" +else + if test ".$CFLAGS" = .; then + CFLAGS="-I$ac_srcdir" + else + CFLAGS="$CFLAGS -I$ac_srcdir" + fi + ac_srcdir="$ac_srcdir/" +fi +$1="$ac_srcdir" +AC_SUBST($1) +])dnl + +dnl ## +dnl ## Support for --enable-subdir (for use with pth.m4) +dnl ## +dnl ## configure.ac: +dnl ## AC_ENABLESUBDIR +dnl ## + +AC_DEFUN(AC_ENABLESUBDIR,[ +AC_ARG_ENABLE(subdir,dnl +[ --enable-subdir enable local building as subdirectory (default=no)],[dnl +],[dnl +enable_subdir=no +])dnl +if test ".$enable_subdir" = .yes; then + enable_batch=yes + enable_shared=no +fi +])dnl + +dnl ## +dnl ## Support for Configuration Headers +dnl ## +dnl ## configure.ac: +dnl ## AC_HEADLINE(, , +dnl ## , , +dnl ## ) +dnl ## + +AC_DEFUN(AC_HEADLINE,[dnl +# configuration header +if test ".`echo dummy [$]@ | grep enable-subdir`" != .; then + enable_subdir=yes +fi +if test ".`echo dummy [$]@ | grep help`" = .; then + # bootstrapping shtool + ac_prog=[$]0 +changequote(, )dnl + ac_srcdir=`echo $ac_prog | sed -e 's%/[^/][^/]*$%%' -e 's%\([^/]\)/*$%\1%'` +changequote([, ])dnl + test ".$ac_srcdir" = ".$ac_prog" && ac_srcdir=. + ac_shtool="${CONFIG_SHELL-/bin/sh} $ac_srcdir/shtool" + + # find out terminal sequences + if test ".$enable_subdir" != .yes; then + TB=`$ac_shtool echo -n -e %B 2>/dev/null` + TN=`$ac_shtool echo -n -e %b 2>/dev/null` + else + TB='' + TN='' + fi + + # find out package version + $3_STR="`$ac_shtool version -lc -dlong $ac_srcdir/$4`" + AC_SUBST($3_STR) + + # friendly header ;) + if test ".$enable_subdir" != .yes; then + echo "Configuring ${TB}$1${TN} ($2), Version ${TB}${$3_STR}${TN}" + echo "$5" + fi + + # additionally find out hex version + $3_HEX="`$ac_shtool version -lc -dhex $ac_srcdir/$4`" + AC_SUBST($3_HEX) +fi +])dnl + +dnl ## +dnl ## Support for Platform IDs +dnl ## +dnl ## configure.ac: +dnl ## AC_PLATFORM() +dnl ## + +AC_DEFUN(AC_PLATFORM,[ +if test ".$host" != .; then + $1="$host" +else + $1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess` +fi +$1=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub $$1` || exit 1 +AC_SUBST($1) +if test ".$enable_subdir" != .yes; then + echo "Platform: ${TB}${$1}${TN}" +fi +])dnl + +dnl ## +dnl ## Support for config.param files +dnl ## +dnl ## configure.ac: +dnl ## AC_CONFIG_PARAM() +dnl ## + +AC_DEFUN(AC_CONFIG_PARAM,[ +AC_DIVERT_PUSH(-1) +AC_ARG_WITH(param,[ --with-param=ID[[,ID,..]] load parameters from $1]) +AC_DIVERT_POP() +AC_DIVERT_PUSH(NOTICE) +ac_prev="" +ac_param="" +if test -f $1; then + ac_param="$1:common" +fi +for ac_option +do + if test ".$ac_prev" != .; then + eval "$ac_prev=\$ac_option" + ac_prev="" + continue + fi + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[[-_a-zA-Z0-9]]*=//'` ;; + *) ac_optarg="" ;; + esac + case "$ac_option" in + --with-param=* ) + case $ac_optarg in + *:* ) + ac_from=`echo $ac_optarg | sed -e 's/:.*//'` + ac_what=`echo $ac_optarg | sed -e 's/.*://'` + ;; + * ) + ac_from="$1" + ac_what="$ac_optarg" + ;; + esac + if test ".$ac_param" = .; then + ac_param="$ac_from:$ac_what" + else + ac_param="$ac_param,$ac_from:$ac_what" + fi + ;; + esac +done +if test ".$ac_param" != .; then + # echo "loading parameters" + OIFS="$IFS" + IFS="," + pconf="/tmp/autoconf.$$" + echo "ac_options=''" >$pconf + ac_from="$1" + for ac_section in $ac_param; do + changequote(, ) + case $ac_section in + *:* ) + ac_from=`echo "$ac_section" | sed -e 's/:.*//'` + ac_section=`echo "$ac_section" | sed -e 's/.*://'` + ;; + esac + (echo ''; cat $ac_from; echo '') |\ + sed -e "1,/[ ]*[ ]*${ac_section}[ ]*{[ ]*/d" \ + -e '/[ ]*}[ ]*/,$d' \ + -e ':join' -e '/\\[ ]*$/N' -e 's/\\[ ]*\n[ ]*//' -e 'tjoin' \ + -e 's/^[ ]*//g' \ + -e 's/^\([^-].*=.*\) IF \(.*\)$/if \2; then \1; fi/' \ + -e 's/^\(--.*=.*\) IF \(.*\)$/if \2; then ac_options="$ac_options \1"; fi/' \ + -e 's/^\(--.*\) IF \(.*\)$/if \2; then ac_options="$ac_options \1"; fi/' \ + -e 's/^\(--.*=.*\)$/ac_options="$ac_options \1"/' \ + -e 's/^\(--.*\)$/ac_options="$ac_options \1"/' \ + >>$pconf + changequote([, ]) + done + IFS="$OIFS" + . $pconf + rm -f $pconf >/dev/null 2>&1 + if test ".[$]*" = .; then + set -- $ac_options + else + set -- "[$]@" $ac_options + fi +fi +AC_DIVERT_POP() +])dnl + +dnl ## +dnl ## Check whether compiler option works +dnl ## +dnl ## configure.ac: +dnl ## AC_COMPILER_OPTION(, ,