]> git.saurik.com Git - apple/xnu.git/blame - osfmk/kern/sync_lock.c
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / kern / sync_lock.c
CommitLineData
1c79356b 1/*
6d2010ae 2 * Copyright (c) 2000-2009 Apple Inc. All rights reserved.
1c79356b 3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
1c79356b 5 *
2d21ac55
A
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
8f6c56a5 14 *
2d21ac55
A
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
8f6c56a5 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
1c79356b
A
27 */
28/*
29 * @OSF_COPYRIGHT@
30 *
31 */
32/*
33 * File: kern/sync_lock.c
34 * Author: Joseph CaraDonna
35 *
36 * Contains RT distributed lock synchronization services.
37 */
38
91447636
A
39#include <mach/mach_types.h>
40#include <mach/lock_set_server.h>
41#include <mach/task_server.h>
42
1c79356b 43#include <kern/misc_protos.h>
91447636 44#include <kern/kalloc.h>
1c79356b
A
45#include <kern/sync_lock.h>
46#include <kern/sched_prim.h>
47#include <kern/ipc_kobject.h>
48#include <kern/ipc_sync.h>
1c79356b
A
49#include <kern/thread.h>
50#include <kern/task.h>
51
52#include <ipc/ipc_port.h>
53#include <ipc/ipc_space.h>
316670eb 54#include <libkern/OSAtomic.h>
1c79356b 55
b0d623f7
A
56
57
1c79356b 58/*
39236c6e 59 * OBSOLETE: lock set routines are obsolete
1c79356b
A
60 */
61kern_return_t
62lock_set_create (
39236c6e
A
63 __unused task_t task,
64 __unused lock_set_t *new_lock_set,
65 __unused int n_ulocks,
66 __unused int policy)
1c79356b 67{
39236c6e 68 return KERN_FAILURE;
1c79356b
A
69}
70
71kern_return_t
39236c6e
A
72lock_set_destroy (
73 __unused task_t task,
74 __unused lock_set_t lock_set)
1c79356b 75{
39236c6e 76 return KERN_FAILURE;
1c79356b
A
77}
78
79kern_return_t
39236c6e
A
80lock_acquire (
81 __unused lock_set_t lock_set,
82 __unused int lock_id)
1c79356b 83{
39236c6e 84 return KERN_FAILURE;
1c79356b
A
85}
86
87kern_return_t
39236c6e
A
88lock_release (
89 __unused lock_set_t lock_set,
90 __unused int lock_id)
1c79356b 91{
39236c6e 92 return KERN_FAILURE;
1c79356b
A
93}
94
1c79356b 95kern_return_t
39236c6e
A
96lock_try (
97 __unused lock_set_t lock_set,
98 __unused int lock_id)
1c79356b 99{
39236c6e 100 return KERN_FAILURE;
1c79356b
A
101}
102
1c79356b 103kern_return_t
39236c6e
A
104lock_make_stable (
105 __unused lock_set_t lock_set,
106 __unused int lock_id)
1c79356b 107{
39236c6e 108 return KERN_FAILURE;
1c79356b
A
109}
110
111kern_return_t
39236c6e
A
112lock_handoff (
113 __unused lock_set_t lock_set,
114 __unused int lock_id)
1c79356b 115{
91447636 116 return KERN_FAILURE;
1c79356b
A
117}
118
119kern_return_t
39236c6e
A
120lock_handoff_accept (
121 __unused lock_set_t lock_set,
122 __unused int lock_id)
1c79356b 123{
91447636 124 return KERN_FAILURE;
1c79356b
A
125}
126
1c79356b 127void
39236c6e
A
128lock_set_reference(
129 __unused lock_set_t lock_set)
1c79356b 130{
39236c6e 131 return;
1c79356b
A
132}
133
1c79356b 134void
39236c6e
A
135lock_set_dereference(
136 __unused lock_set_t lock_set)
1c79356b 137{
39236c6e 138 return;
91447636
A
139}
140