Deleted Added
full compact
thr_aio_suspend.c (123312) thr_aio_suspend.c (156611)
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/libkse/thread/thr_aio_suspend.c 123312 2003-12-09 02:20:56Z davidxu $
29 * $FreeBSD: head/lib/libkse/thread/thr_aio_suspend.c 156611 2006-03-13 00:59:51Z deischen $
30 */
31
32#include <aio.h>
33#include <pthread.h>
34#include "thr_private.h"
35
30 */
31
32#include <aio.h>
33#include <pthread.h>
34#include "thr_private.h"
35
36LT10_COMPAT_PRIVATE(_aio_suspend);
37LT10_COMPAT_DEFAULT(aio_suspend);
38
36__weak_reference(_aio_suspend, aio_suspend);
37
38int
39_aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct
40 timespec *timeout)
41{
42 struct pthread *curthread = _get_curthread();
43 int ret;
44
45 _thr_cancel_enter(curthread);
46 ret = __sys_aio_suspend(iocbs, niocb, timeout);
47 _thr_cancel_leave(curthread, 1);
48
49 return (ret);
50}
51
39__weak_reference(_aio_suspend, aio_suspend);
40
41int
42_aio_suspend(const struct aiocb * const iocbs[], int niocb, const struct
43 timespec *timeout)
44{
45 struct pthread *curthread = _get_curthread();
46 int ret;
47
48 _thr_cancel_enter(curthread);
49 ret = __sys_aio_suspend(iocbs, niocb, timeout);
50 _thr_cancel_leave(curthread, 1);
51
52 return (ret);
53}
54