Deleted Added
full compact
sem.c (125521) sem.c (149313)
1/*
2 * Copyright (C) 2000 Jason Evans <jasone@freebsd.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
1/*
2 * Copyright (C) 2000 Jason Evans <jasone@freebsd.org>.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
24 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
25 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * $FreeBSD: head/lib/libc/gen/sem.c 125521 2004-02-06 15:15:44Z deischen $
29 * $FreeBSD: head/lib/libc/gen/sem.c 149313 2005-08-20 07:59:13Z stefanf $
30 */
31
32/*
33 * Some notes about this implementation.
34 *
35 * This is mostly a simple implementation of POSIX semaphores that
36 * does not need threading. Any semaphore created is a kernel-based
37 * semaphore regardless of the pshared attribute. This is necessary

--- 14 unchanged lines hidden (view full) ---

52 *
53 * The function sem_init() should be overridden by a threads
54 * library if it wants to provide a different userland version
55 * of semaphores. The functions sem_wait() and sem_timedwait()
56 * need to be wrapped to provide cancellation points. The function
57 * sem_post() may need to be wrapped to be signal-safe.
58 */
59#include "namespace.h"
30 */
31
32/*
33 * Some notes about this implementation.
34 *
35 * This is mostly a simple implementation of POSIX semaphores that
36 * does not need threading. Any semaphore created is a kernel-based
37 * semaphore regardless of the pshared attribute. This is necessary

--- 14 unchanged lines hidden (view full) ---

52 *
53 * The function sem_init() should be overridden by a threads
54 * library if it wants to provide a different userland version
55 * of semaphores. The functions sem_wait() and sem_timedwait()
56 * need to be wrapped to provide cancellation points. The function
57 * sem_post() may need to be wrapped to be signal-safe.
58 */
59#include "namespace.h"
60#include <sys/types.h>
60#include <sys/queue.h>
61#include <errno.h>
62#include <fcntl.h>
63#include <pthread.h>
64#include <semaphore.h>
65#include <stdarg.h>
66#include <stdlib.h>
67#include <time.h>

--- 293 unchanged lines hidden ---
61#include <sys/queue.h>
62#include <errno.h>
63#include <fcntl.h>
64#include <pthread.h>
65#include <semaphore.h>
66#include <stdarg.h>
67#include <stdlib.h>
68#include <time.h>

--- 293 unchanged lines hidden ---