Home
last modified time | relevance | path

Searched refs:rw (Results 1 – 25 of 392) sorted by relevance

12345678910>>...16

/freebsd/sbin/ipf/libipf/
H A Drwlock_emul.c14 void eMrwlock_read_enter(eMrwlock_t *rw, char *file, int line) in eMrwlock_read_enter() argument
16 if (rw->eMrw_magic != EMM_MAGIC) { in eMrwlock_read_enter()
18 rw->eMrw_owner, rw, rw->eMrw_magic); in eMrwlock_read_enter()
21 if (rw->eMrw_read != 0 || rw->eMrw_write != 0) { in eMrwlock_read_enter()
24 rw->eMrw_owner, rw, rw->eMrw_read, rw->eMrw_write); in eMrwlock_read_enter()
27 rw->eMrw_read++; in eMrwlock_read_enter()
28 rw->eMrw_heldin = file; in eMrwlock_read_enter()
29 rw->eMrw_heldat = line; in eMrwlock_read_enter()
33 void eMrwlock_write_enter(eMrwlock_t *rw, char *file, int line) in eMrwlock_write_enter() argument
35 if (rw->eMrw_magic != EMM_MAGIC) { in eMrwlock_write_enter()
[all …]
/freebsd/sys/contrib/ck/include/
H A Dck_rwlock.h44 ck_rwlock_init(struct ck_rwlock *rw) in ck_rwlock_init() argument
47 rw->writer = 0; in ck_rwlock_init()
48 rw->n_readers = 0; in ck_rwlock_init()
54 ck_rwlock_write_unlock(ck_rwlock_t *rw) in ck_rwlock_write_unlock() argument
58 ck_pr_store_uint(&rw->writer, 0); in ck_rwlock_write_unlock()
63 ck_rwlock_locked_writer(ck_rwlock_t *rw) in ck_rwlock_locked_writer() argument
67 r = ck_pr_load_uint(&rw->writer); in ck_rwlock_locked_writer()
73 ck_rwlock_write_downgrade(ck_rwlock_t *rw) in ck_rwlock_write_downgrade() argument
76 ck_pr_inc_uint(&rw->n_readers); in ck_rwlock_write_downgrade()
77 ck_rwlock_write_unlock(rw); in ck_rwlock_write_downgrade()
[all …]
H A Dck_swlock.h49 ck_swlock_init(struct ck_swlock *rw) in ck_swlock_init() argument
52 rw->value = 0; in ck_swlock_init()
58 ck_swlock_write_unlock(ck_swlock_t *rw) in ck_swlock_write_unlock() argument
62 ck_pr_and_32(&rw->value, CK_SWLOCK_READER_MASK); in ck_swlock_write_unlock()
67 ck_swlock_locked_writer(ck_swlock_t *rw) in ck_swlock_locked_writer() argument
71 r = ck_pr_load_32(&rw->value) & CK_SWLOCK_WRITER_BIT; in ck_swlock_locked_writer()
77 ck_swlock_write_downgrade(ck_swlock_t *rw) in ck_swlock_write_downgrade() argument
80 ck_pr_inc_32(&rw->value); in ck_swlock_write_downgrade()
81 ck_swlock_write_unlock(rw); in ck_swlock_write_downgrade()
86 ck_swlock_locked(ck_swlock_t *rw) in ck_swlock_locked() argument
[all …]
/freebsd/sys/sys/
H A Drwlock.h84 #define _rw_write_lock(rw, tid) \ argument
85 atomic_cmpset_acq_ptr(&(rw)->rw_lock, RW_UNLOCKED, (tid))
87 #define _rw_write_lock_fetch(rw, vp, tid) \ argument
88 atomic_fcmpset_acq_ptr(&(rw)->rw_lock, vp, (tid))
91 #define _rw_write_unlock(rw, tid) \ argument
92 atomic_cmpset_rel_ptr(&(rw)->rw_lock, (tid), RW_UNLOCKED)
94 #define _rw_write_unlock_fetch(rw, tid) \ argument
95 atomic_fcmpset_rel_ptr(&(rw)->rw_lock, (tid), RW_UNLOCKED)
104 #define __rw_wlock(rw, tid, file, line) __extension__ ({ \ argument
109 !_rw_write_lock_fetch((rw), &_v, _tid))) \
[all …]
/freebsd/sys/kern/
H A Dkern_rwlock.c138 #define rw_wowner(rw) lv_rw_wowner(RW_READ_VALUE(rw)) argument
144 #define rw_recursed(rw) ((rw)->rw_recurse != 0) argument
149 #define rw_wlocked(rw) (rw_wowner((rw)) == curthread) argument
156 #define rw_owner(rw) rw_wowner(rw) argument
172 struct rwlock *rw; in lock_rw() local
174 rw = (struct rwlock *)lock; in lock_rw()
176 rw_rlock(rw); in lock_rw()
178 rw_wlock(rw); in lock_rw()
184 struct rwlock *rw; in trylock_rw() local
186 rw = (struct rwlock *)lock; in trylock_rw()
[all …]
H A Dsubr_rtc.c157 clock_dbgprint_hdr(device_t dev, int rw) in clock_dbgprint_hdr() argument
162 device_printf(dev, "%s at ", (rw & CLOCK_DBG_READ) ? "read " : "write"); in clock_dbgprint_hdr()
168 clock_dbgprint_bcd(device_t dev, int rw, const struct bcd_clocktime *bct) in clock_dbgprint_bcd() argument
171 if (show_io & rw) { in clock_dbgprint_bcd()
172 clock_dbgprint_hdr(dev, rw); in clock_dbgprint_bcd()
179 clock_dbgprint_ct(device_t dev, int rw, const struct clocktime *ct) in clock_dbgprint_ct() argument
182 if (show_io & rw) { in clock_dbgprint_ct()
183 clock_dbgprint_hdr(dev, rw); in clock_dbgprint_ct()
190 clock_dbgprint_err(device_t dev, int rw, int err) in clock_dbgprint_err() argument
193 if (show_io & rw) { in clock_dbgprint_err()
[all …]
/freebsd/tests/sys/acl/
H A Dtools-posix.test43 > user::rw-
48 > user::rw-
57 > user::rw-
61 > mask::rw-
66 > -rw-rw-r--+
84 > user::rw-
88 > mask::rw-
108 > -rw-rw-r--+
118 > user::rw-
121 > mask::rw-
[all …]
H A Dtools-nfs4-psarc.test43 > owner@:rw-p--aARWcCos:-------:allow
48 > owner@:rw-p--aARWcCos:-------:allow
67 > owner@:rw-p--aARWcCos:-------:allow
81 > owner@:rw-p--aARWcCos:-------:allow
89 > -rw-r--r--+
97 > owner@:rw-p--aARWcCos:-------:allow
114 > owner@:rw-p--aARWcCos:-------:allow
127 > owner@:rw-p--aARWcCos:-------:allow
135 > -rw-r--r--
147 > owner@:rw-p--aARWcCos:-------:allow
[all …]
H A Dtools-nfs4.test44 > owner@:rw-p---A-W-Co-:-------:allow
52 > owner@:rw-p---A-W-Co-:-------:allow
77 > owner@:rw-p---A-W-Co-:-------:allow
94 > owner@:rw-p---A-W-Co-:-------:allow
104 > -rw-r--r--+
114 > owner@:rw-p---A-W-Co-:-------:allow
133 > owner@:rw-p---A-W-Co-:-------:allow
148 > owner@:rw-p---A-W-Co-:-------:allow
157 > -rw-r--r--
170 > owner@:rw-p---A-W-Co-:-------:allow
[all …]
H A Dtools-crossfs.test44 > owner@:rw-p--aARWcCos:-------:allow
50 > user::rw-
69 > other::rw-
100 > everyone@:rw-p--a-R-c--s:-------:allow
113 > owner@:rw-p--aARWcCos:-------:allow
117 > -rw-r--r--+
166 > -rw-rwxr--+
169 > -rw-r-xr--
177 > user::rw-
184 > -rw-rwxr--+
[all …]
/freebsd/bin/sh/tests/expansion/
H A Darith10.012 rw=1
19 check "0 && (rw += 1)" 0
20 check "rw" 1
21 check "1 || (rw += 1)" 1
22 check "rw" 1
26 check "0 ? rw += 1 : 52" 52
27 check "rw" 1
31 check "4 ? 1 : (rw += 1)" 1
32 check "rw" 1
/freebsd/share/examples/ipfilter/samples/
H A Drelay.c36 int nfd, n, rw; local
65 rw = read(ifd, irh, ibuff + RELAY_BUFSZ - irh);
66 if (rw == -1)
68 if (rw == 0)
70 irh += rw;
74 rw = write(ofd, iwt, iwh - iwt);
75 if (rw == -1)
77 iwt += rw;
81 rw = read(rfd, iwh, obuff + RELAY_BUFSZ - iwh);
82 if (rw == -1)
[all …]
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Drwlock.h38 struct rwlock rw; global() member
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/
H A Dzfs_uio.c65 zfs_uiomove_iov(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) in zfs_uiomove_iov() argument
79 if (rw == UIO_READ) { in zfs_uiomove_iov()
112 if (rw == UIO_READ) in zfs_uiomove_iov()
136 zfs_uiomove_bvec_impl(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) in zfs_uiomove_bvec_impl() argument
147 if (rw == UIO_READ) { in zfs_uiomove_bvec_impl()
172 zfs_copy_bvec(void *p, size_t skip, size_t cnt, zfs_uio_rw_t rw, in zfs_copy_bvec() argument
178 if (rw == UIO_READ) { in zfs_copy_bvec()
193 zfs_uiomove_bvec_rq(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) in zfs_uiomove_bvec_rq() argument
244 zfs_copy_bvec(p, skip_in_seg, copy_from_seg, rw, &bv); in zfs_uiomove_bvec_rq()
264 zfs_uiomove_bvec(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio) in zfs_uiomove_bvec() argument
[all …]
/freebsd/contrib/netbsd-tests/rump/kernspace/
H A Dlockme.c53 krwlock_t rw; in rumptest_lockme() local
55 rw_init(&rw); in rumptest_lockme()
64 rw_enter(&rw, RW_WRITER); in rumptest_lockme()
65 rw_enter(&rw, RW_WRITER); in rumptest_lockme()
68 rw_enter(&rw, RW_READER); in rumptest_lockme()
69 rw_enter(&rw, RW_WRITER); in rumptest_lockme()
72 rw_enter(&rw, RW_WRITER); in rumptest_lockme()
73 rw_enter(&rw, RW_READER); in rumptest_lockme()
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/io/
H A Dio.cfg22 FIO_READ_ARGS="--name=rw --rw=read $FIO_COMMON_ARGS"
23 FIO_WRITE_ARGS="--name=rw --rw=write $FIO_COMMON_ARGS"
24 FIO_RANDREAD_ARGS="--name=rw --rw=randread $FIO_COMMON_ARGS"
25 FIO_RANDWRITE_ARGS="--name=rw --rw=randwrite $FIO_COMMON_ARGS"
/freebsd/usr.sbin/bluetooth/bcmfw/
H A DREADME8 -rw-r--r-- 1 julian wheel 154 May 10 00:41 BCM-LEGAL.txt
9 -rw-r--r-- 1 julian wheel 56 May 10 00:14 BCM2033-FW.bin.md5
10 -rw-r--r-- 1 julian wheel 158049 May 10 00:14 BCM2033-FW.bin.uue
11 -rw-r--r-- 1 julian wheel 56 May 10 00:14 BCM2033-MD.hex.md5
12 -rw-r--r-- 1 julian wheel 4505 May 10 00:14 BCM2033-MD.hex.uue
14 -rw-r--r-- 1 julian wheel 516 May 10 00:14 Makefile
15 -rw-r--r-- 1 julian wheel 3013 May 10 00:14 bcmfw.8
16 -rw-r--r-- 1 julian wheel 6806 May 10 00:14 bcmfw.c
/freebsd/sbin/ipf/ipfs/
H A Dipfs.c88 int fd, olen, nlen, rw; in changestateif() local
110 rw = 0; in changestateif()
113 rw = 1; in changestateif()
117 rw = 1; in changestateif()
121 rw = 1; in changestateif()
125 rw = 1; in changestateif()
127 if (rw == 1) { in changestateif()
150 int fd, olen, nlen, rw; in changenatif() local
174 rw = 0; in changenatif()
177 rw = 1; in changenatif()
[all …]
/freebsd/sys/dev/drm2/ttm/
H A Dttm_lock.c51 lock->rw = 0; in ttm_lock_init()
71 if (--lock->rw == 0) in ttm_read_unlock()
84 if (lock->rw >= 0 && lock->flags == 0) { in __ttm_read_lock()
85 ++lock->rw; in __ttm_read_lock()
126 if (lock->rw >= 0 && lock->flags == 0) { in __ttm_read_trylock()
127 ++lock->rw; in __ttm_read_trylock()
168 lock->rw = 0; in ttm_write_unlock()
181 if (lock->rw == 0 && ((lock->flags & ~TTM_WRITE_LOCK_PENDING) == 0)) { in __ttm_write_lock()
182 lock->rw = -1; in __ttm_write_lock()
225 lock->rw = 1; in ttm_write_lock_downgrade()
[all …]
/freebsd/sys/dev/bhnd/bhndb/
H A Dbhndb_subr.c1334 const struct bhndb_regwin *rw; in bhndb_dw_set_addr() local
1338 rw = dwa->win; in bhndb_dw_set_addr()
1344 offset = addr % rw->win_size; in bhndb_dw_set_addr()
1348 if (rw->win_size - offset < size) in bhndb_dw_set_addr()
1440 const struct bhndb_regwin *rw; in bhndb_regwin_count() local
1444 for (rw = table; rw->win_type != BHNDB_REGWIN_T_INVALID; rw++) { in bhndb_regwin_count()
1445 if (type == BHNDB_REGWIN_T_INVALID || rw->win_type == type) in bhndb_regwin_count()
1466 const struct bhndb_regwin *rw; in bhndb_regwin_find_type() local
1468 for (rw = table; rw->win_type != BHNDB_REGWIN_T_INVALID; rw++) in bhndb_regwin_find_type()
1470 if (rw->win_type == type && rw->win_size >= min_size) in bhndb_regwin_find_type()
[all …]
/freebsd/sys/contrib/openzfs/module/os/freebsd/spl/
H A Dspl_uio.c74 zfs_uiocopy(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio, size_t *cbytes) in zfs_uiocopy() argument
81 ASSERT3U(zfs_uio_rw(uio), ==, rw); in zfs_uiocopy()
176 zfs_uio_rw_t rw, vm_page_t *pages) in zfs_uio_hold_pages() argument
185 prot = rw == UIO_READ ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; in zfs_uio_hold_pages()
193 zfs_uio_free_dio_pages(zfs_uio_t *uio, zfs_uio_rw_t rw) in zfs_uio_free_dio_pages() argument
197 ASSERT(zfs_uio_rw(uio) == rw); in zfs_uio_free_dio_pages()
199 if (rw == UIO_WRITE) in zfs_uio_free_dio_pages()
211 size_t len, zfs_uio_rw_t rw, vm_page_t *pages) in zfs_uio_get_user_pages() argument
215 count = zfs_uio_hold_pages(start, len, nr_pages, rw, pages); in zfs_uio_get_user_pages()
285 zfs_uio_get_dio_pages_alloc(zfs_uio_t *uio, zfs_uio_rw_t rw) in zfs_uio_get_dio_pages_alloc() argument
[all …]
/freebsd/sys/arm/arm/
H A Ddb_interface.c102 db_access_und_sp(struct db_variable *vp, db_expr_t *valp, int rw) in db_access_und_sp() argument
105 if (rw == DB_VAR_GET) { in db_access_und_sp()
113 db_access_abt_sp(struct db_variable *vp, db_expr_t *valp, int rw) in db_access_abt_sp() argument
116 if (rw == DB_VAR_GET) { in db_access_abt_sp()
124 db_access_irq_sp(struct db_variable *vp, db_expr_t *valp, int rw) in db_access_irq_sp() argument
127 if (rw == DB_VAR_GET) { in db_access_irq_sp()
134 int db_frame(struct db_variable *vp, db_expr_t *valp, int rw) in db_frame() argument
142 if (rw == DB_VAR_GET) in db_frame()
/freebsd/sys/contrib/openzfs/module/zfs/
H A Drrwlock.c231 rrw_enter(rrwlock_t *rrl, krw_t rw, const void *tag) in rrw_enter() argument
233 if (rw == RW_READER) in rrw_enter()
284 rrw_held(rrwlock_t *rrl, krw_t rw) in rrw_held() argument
289 if (rw == RW_WRITER) { in rrw_held()
342 rrm_enter(rrmlock_t *rrl, krw_t rw, const void *tag) in rrm_enter() argument
344 if (rw == RW_READER) in rrm_enter()
389 rrm_held(rrmlock_t *rrl, krw_t rw) in rrm_held() argument
391 if (rw == RW_WRITER) { in rrm_held()
392 return (rrw_held(&rrl->locks[0], rw)); in rrm_held()
394 return (rrw_held(&rrl->locks[RRM_TD_LOCK()], rw)); in rrm_held()
/freebsd/sys/netpfil/ipfw/
H A Dip_fw_sockopt.c1094 struct opcode_obj_rewrite *rw; in move_objects() local
1113 rw = find_op_rw(cmd, &kidx, NULL); in move_objects()
1114 if (rw == NULL || rw->manage_sets == NULL) in move_objects()
1122 if (rw->manage_sets(ch, kidx, 1, COUNT_ONE) != 0) in move_objects()
1140 rw = find_op_rw(cmd, &kidx, NULL); in move_objects()
1141 if (rw == NULL || rw->manage_sets == NULL) in move_objects()
1144 c = rw->manage_sets(ch, kidx, in move_objects()
1159 rw = find_op_rw(cmd, &kidx, NULL); in move_objects()
1160 if (rw == NULL || rw->manage_sets == NULL) in move_objects()
1163 rw->manage_sets(ch, kidx, in move_objects()
[all …]
/freebsd/stand/common/
H A Dbcache.c187 write_strategy(void *devdata, int rw, daddr_t blk, size_t size, in write_strategy() argument
202 return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); in write_strategy()
211 read_strategy(void *devdata, int rw, daddr_t blk, size_t size, in read_strategy() argument
309 if ((rw & F_NORA) == F_NORA) in read_strategy()
347 rw &= F_MASK; in read_strategy()
348 result = dd->dv_strategy(dd->dv_devdata, rw, p_blk, in read_strategy()
391 bcache_strategy(void *devdata, int rw, daddr_t blk, size_t size, in bcache_strategy() argument
410 rw &= F_MASK; in bcache_strategy()
411 return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); in bcache_strategy()
414 switch (rw & F_MASK) { in bcache_strategy()
[all …]

12345678910>>...16