distro: Change the module name space to (gnu ...).
[jackhill/guix/guix.git] / gnu / packages / pth.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages pth)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu))
24
25 (define-public pth
26 (package
27 (name "pth")
28 (version "2.0.7")
29 (source
30 (origin
31 (method url-fetch)
32 (uri (string-append "mirror://gnu/pth/pth-" version
33 ".tar.gz"))
34 (sha256
35 (base32
36 "0ckjqw5kz5m30srqi87idj7xhpw6bpki43mj07bazjm2qmh3cdbj"))))
37 (build-system gnu-build-system)
38 (arguments '(#:parallel-build? #f))
39 (home-page "http://www.gnu.org/software/pth")
40 (synopsis "The GNU Portable Threads library")
41 (description
42 "Pth is a very portable POSIX/ANSI-C based library for Unix
43 platforms which provides non-preemptive priority-based scheduling for
44 multiple threads of execution (aka ``multithreading'') inside
45 event-driven applications. All threads run in the same address space of
46 the server application, but each thread has it's own individual
47 program-counter, run-time stack, signal mask and errno variable.
48
49 The thread scheduling itself is done in a cooperative way, i.e., the
50 threads are managed by a priority- and event-based non-preemptive
51 scheduler. The intention is that this way one can achieve better
52 portability and run-time performance than with preemptive
53 scheduling. The event facility allows threads to wait until various
54 types of events occur, including pending I/O on file descriptors,
55 asynchronous signals, elapsed timers, pending I/O on message ports,
56 thread and process termination, and even customized callback functions.
57
58 Additionally Pth provides an optional emulation API for POSIX.1c
59 threads (\"Pthreads\") which can be used for backward compatibility to
60 existing multithreaded applications.")
61 (license lgpl2.1+)))