| /netbsd-src/external/gpl2/lvm2/dist/libdm/mm/ |
| H A D | dbg_malloc.c | 128 struct memblock *mb = ((struct memblock *) p) - 1; in dm_free_aux() local 135 assert(mb->magic == p); in dm_free_aux() 138 ptr = ((char *) mb) + sizeof(struct memblock) + mb->length; in dm_free_aux() 140 if (*ptr++ != (char) mb->id) in dm_free_aux() 144 assert(mb->id != 0); in dm_free_aux() 147 if (mb->prev) in dm_free_aux() 148 mb->prev->next = mb->next; in dm_free_aux() 150 _head = mb->next; in dm_free_aux() 152 if (mb->next) in dm_free_aux() 153 mb->next->prev = mb->prev; in dm_free_aux() [all …]
|
| /netbsd-src/external/gpl2/xcvs/dist/src/ |
| H A D | ms-buffer.c | 46 struct ms_buffer *mb = closure; in ms_buffer_block() local 48 mb->block = block; in ms_buffer_block() 50 return set_block (mb->cur); in ms_buffer_block() 52 return set_nonblock (mb->cur); in ms_buffer_block() 62 struct ms_buffer *mb = closure; in ms_buffer_input() local 65 assert (mb->cur->input); in ms_buffer_input() 66 status = (*mb->cur->input) (mb->cur->closure, data, need, size, got); in ms_buffer_input() 76 if (list_isempty (mb->bufs)) return -1; in ms_buffer_input() 77 buf_shutdown (mb->cur); in ms_buffer_input() 78 buf_free (mb->cur); in ms_buffer_input() [all …]
|
| /netbsd-src/sys/arch/arm/mainbus/ |
| H A D | mainbus.c | 102 struct mainbus_attach_args *mb = aux; in mainbusprint() local 104 if (mb->mb_iobase != MAINBUSCF_BASE_DEFAULT) in mainbusprint() 105 aprint_normal(" base 0x%x", mb->mb_iobase); in mainbusprint() 106 if (mb->mb_iosize > 1) in mainbusprint() 107 aprint_normal("-0x%x", mb->mb_iobase + mb->mb_iosize - 1); in mainbusprint() 108 if (mb->mb_irq != -1) in mainbusprint() 109 aprint_normal(" irq %d", mb->mb_irq); in mainbusprint() 110 if (mb->mb_drq != -1) in mainbusprint() 111 aprint_normal(" drq 0x%08x", mb->mb_drq); in mainbusprint() 112 if (mb->mb_core != MAINBUSCF_CORE_DEFAULT) in mainbusprint() [all …]
|
| H A D | cpu_mainbus.c | 79 struct mainbus_attach_args * const mb = aux; in cpu_mainbus_match() local 80 int id = mb->mb_core; in cpu_mainbus_match() 95 mb->mb_core = 0; in cpu_mainbus_match() 103 mb->mb_core = id; in cpu_mainbus_match() 120 struct mainbus_attach_args * const mb = aux; in cpu_mainbus_attach() local 122 cpu_attach(self, mb->mb_core); in cpu_mainbus_attach()
|
| /netbsd-src/sys/external/bsd/common/include/asm/ |
| H A D | barrier.h | 55 #define mb() dsb(sy) macro 60 #define mb() dsb() macro 61 #define wmb() mb() 62 #define rmb() mb() 65 #define mb() x86_mfence() macro 69 #define mb() __asm __volatile ("eieio" ::: "memory") macro 70 #define wmb() mb() 71 #define rmb() mb() 74 #define mb() __asm __volatile ("membar #MemIssue" ::: "memory") macro 76 #define mb() membar_sync() /* ldstub */ macro [all …]
|
| /netbsd-src/sys/dev/ |
| H A D | midivar.h | 124 #define MIDI_BUF_CONSUMER_REFRESH(mb,frk) \ argument 125 ((__CONCAT(frk,_lim)=(mb)->__CONCAT(frk,_producerp)), \ 127 (__CONCAT(frk,_lim) += sizeof (mb)->frk) : __CONCAT(frk,_lim)) 129 #define MIDI_BUF_PRODUCER_REFRESH(mb,frk) \ argument 130 ((__CONCAT(frk,_lim)=(mb)->__CONCAT(frk,_consumerp)-1), \ 132 (__CONCAT(frk,_lim) += sizeof (mb)->frk) : __CONCAT(frk,_lim)) 134 #define MIDI_BUF_EXTENT_INIT(mb,frk) \ argument 135 ((__CONCAT(frk,_org)=(mb)->frk), \ 136 (__CONCAT(frk,_end)=__CONCAT(frk,_org)+sizeof (mb)->frk)) 138 #define MIDI_BUF_CONSUMER_INIT(mb,frk) \ argument [all …]
|
| H A D | midi.c | 344 midi_initbuf(struct midi_buffer *mb) in midi_initbuf() argument 346 mb->idx_producerp = mb->idx_consumerp = mb->idx; in midi_initbuf() 347 mb->buf_producerp = mb->buf_consumerp = mb->buf; in midi_initbuf() 690 struct midi_buffer *mb; in midi_in() local 697 mb = &sc->inbuf; in midi_in() 758 MIDI_BUF_PRODUCER_INIT(mb,idx); in midi_in() 759 MIDI_BUF_PRODUCER_INIT(mb,buf); in midi_in() 773 MIDI_BUF_PRODUCER_WBACK(mb,buf); in midi_in() 774 MIDI_BUF_PRODUCER_WBACK(mb,idx); in midi_in() 906 struct midi_buffer *mb; in midiread() local [all …]
|
| /netbsd-src/external/mpl/dhcp/bind/dist/lib/dns/rdata/generic/ |
| H A D | mb_7.c | 126 dns_rdata_mb_t *mb = source; in fromstruct_mb() local 130 REQUIRE(mb != NULL); in fromstruct_mb() 131 REQUIRE(mb->common.rdtype == type); in fromstruct_mb() 132 REQUIRE(mb->common.rdclass == rdclass); in fromstruct_mb() 137 dns_name_toregion(&mb->mb, ®ion); in fromstruct_mb() 144 dns_rdata_mb_t *mb = target; in tostruct_mb() local 148 REQUIRE(mb != NULL); in tostruct_mb() 151 mb->common.rdclass = rdata->rdclass; in tostruct_mb() 152 mb->common.rdtype = rdata->type; in tostruct_mb() 153 ISC_LINK_INIT(&mb->common, link); in tostruct_mb() [all …]
|
| /netbsd-src/external/mpl/bind/dist/lib/dns/rdata/generic/ |
| H A D | mb_7.c | 126 dns_rdata_mb_t *mb = source; in fromstruct_mb() local 130 REQUIRE(mb != NULL); in fromstruct_mb() 131 REQUIRE(mb->common.rdtype == type); in fromstruct_mb() 132 REQUIRE(mb->common.rdclass == rdclass); in fromstruct_mb() 137 dns_name_toregion(&mb->mb, ®ion); in fromstruct_mb() 144 dns_rdata_mb_t *mb = target; in tostruct_mb() local 148 REQUIRE(mb != NULL); in tostruct_mb() 151 mb->common.rdclass = rdata->rdclass; in tostruct_mb() 152 mb in tostruct_mb() 166 dns_rdata_mb_t *mb = source; freestruct_mb() local [all...] |
| /netbsd-src/sys/dev/acpi/ |
| H A D | acpi_mcfg.c | 54 #define PCIDEV_SET_VALID(mb, d, f) ((mb)->valid_devs[(d)] |= __BIT((f))) argument 55 #define PCIDEV_SET_INVALID(mb, d, f) ((mb)->valid_devs[(d)] &= ~__BIT((f))) argument 56 #define PCIDEV_IS_VALID(mb, d, f) ((mb)->valid_devs[(d)] & __BIT((f))) argument 58 #define EXTCONF_SET_VALID(mb, d, f) ((mb)->valid_extconf[(d)] |= __BIT((f))) argument 59 #define EXTCONF_SET_INVALID(mb, d, f) ((mb) argument 60 EXTCONF_IS_VALID(mb,d,f) global() argument 464 struct mcfg_bus *mb; acpimcfg_device_probe() local 545 struct mcfg_bus *mb; acpimcfg_map_bus() local 770 struct mcfg_bus *mb; acpimcfg_configure_bus() local 869 struct mcfg_bus *mb; acpimcfg_conf_read() local 906 struct mcfg_bus *mb; acpimcfg_conf_write() local 935 struct mcfg_bus *mb; acpimcfg_conf_valid() local [all...] |
| /netbsd-src/external/bsd/pdisk/dist/ |
| H A D | validate.c | 86 static DPME *mb; variable 138 mb = entry->data; in get_block_n() 147 mb = (DPME *) buffer; in get_block_n() 148 convert_dpme(mb, 1); in get_block_n() 417 if (mb->dpme_signature != DPME_SIGNATURE) { in validate_map() 420 limit = mb->dpme_map_entries; in validate_map() 449 if (mb->dpme_signature != DPME_SIGNATURE) { in validate_map() 451 printf("\tsignature is 0x%x, should be 0x%x\n", mb->dpme_signature, DPME_SIGNATURE); in validate_map() 454 if (mb->dpme_reserved_1 != 0) { in validate_map() 456 printf("\treserved word is 0x%x, should be 0\n", mb->dpme_reserved_1); in validate_map() [all …]
|
| /netbsd-src/usr.bin/systat/ |
| H A D | mbufs.c | 52 static struct mbstat *mb; variable 89 if (mb == 0) in showmbufs() 94 if (mb->m_mtypes[i] > max) { in showmbufs() 95 max = mb->m_mtypes[i]; in showmbufs() 115 mb->m_mtypes[idx] = 0; in showmbufs() 124 if (mb == 0) in initmbufs() 125 mb = calloc(1, sizeof (*mb)); in initmbufs() 132 size_t len = sizeof(*mb); in fetchmbufs() 133 if (sysctlbyname("kern.mbuf.stats", mb, &len, NULL, 0)) in fetchmbufs()
|
| /netbsd-src/bin/pax/ |
| H A D | ar_io.c | 133 struct mtget mb; in ar_open() local 229 artyp = ioctl(arfd, MTIOCGET, &mb) ? ISCHR : ISTAPE; in ar_open() 950 struct mtop mb; in ar_rdsync() local 987 mb.mt_op = MTFSR; in ar_rdsync() 988 mb.mt_count = 1; in ar_rdsync() 991 if (rmtioctl(arfd, MTIOCTOP, &mb) < 0) in ar_rdsync() 995 if (ioctl(arfd, MTIOCTOP, &mb) < 0) in ar_rdsync() 1119 struct mtop mb; in ar_rev() local 1227 mb.mt_op = MTBSR; in ar_rev() 1228 mb.mt_count = sksz/phyblk; in ar_rev() [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/binutils/ |
| H A D | winduni.c | 747 wind_MultiByteToWideChar (rc_uint_type cp, const char *mb, in wind_MultiByteToWideChar() argument 762 mb, -1, u, u_len); in wind_MultiByteToWideChar() 772 if (!mb || !iconv_name) in wind_MultiByteToWideChar() 783 iret = iconv_onechar (cd, (ICONV_CONST char *) mb, p_tmp, 32, & n_mb, & n_tmp); in wind_MultiByteToWideChar() 807 mb = n_mb; in wind_MultiByteToWideChar() 813 ret = strlen (mb) + 1; in wind_MultiByteToWideChar() 819 *u++ = ((unichar) *mb) & 0xff; in wind_MultiByteToWideChar() 820 --u_len; mb++; in wind_MultiByteToWideChar() 822 while (u_len != 0 && mb[-1] != 0); in wind_MultiByteToWideChar() 831 wind_WideCharToMultiByte (rc_uint_type cp, const unichar *u, char *mb, rc_uint_type mb_len) in wind_WideCharToMultiByte() argument [all …]
|
| /netbsd-src/external/gpl3/binutils.old/dist/binutils/ |
| H A D | winduni.c | 747 wind_MultiByteToWideChar (rc_uint_type cp, const char *mb, in wind_MultiByteToWideChar() argument 762 mb, -1, u, u_len); in wind_MultiByteToWideChar() 772 if (!mb || !iconv_name) in wind_MultiByteToWideChar() 783 iret = iconv_onechar (cd, (ICONV_CONST char *) mb, p_tmp, 32, & n_mb, & n_tmp); in wind_MultiByteToWideChar() 807 mb = n_mb; in wind_MultiByteToWideChar() 813 ret = strlen (mb) + 1; in wind_MultiByteToWideChar() 819 *u++ = ((unichar) *mb) & 0xff; in wind_MultiByteToWideChar() 820 --u_len; mb++; in wind_MultiByteToWideChar() 822 while (u_len != 0 && mb[-1] != 0); in wind_MultiByteToWideChar() 831 wind_WideCharToMultiByte (rc_uint_type cp, const unichar *u, char *mb, rc_uint_type mb_len) in wind_WideCharToMultiByte() argument [all …]
|
| /netbsd-src/external/bsd/ipf/dist/lib/ |
| H A D | ipft_hx.c | 59 static int hex_readip(mb, ifn, dir) in hex_readip() argument 60 mb_t *mb; in hex_readip() 69 buf = (char *)mb->mb_buf; 82 mb->mb_len = (char *)ip - buf; 83 return mb->mb_len; 115 mb->mb_flags |= M_MCAST; 119 mb->mb_flags |= M_BCAST; 123 mb->mb_flags |= M_MBCAST;
|
| /netbsd-src/sys/arch/arm/cortex/ |
| H A D | armperiph.c | 140 struct mainbus_attach_args * const mb = aux; in armperiph_match() local 150 if (base != MAINBUSCF_BASE_DEFAULT || base != mb->mb_iobase in armperiph_match() 151 || size != MAINBUSCF_SIZE_DEFAULT || size != mb->mb_iosize in armperiph_match() 152 || dack != MAINBUSCF_DACK_DEFAULT || dack != mb->mb_drq in armperiph_match() 153 || irq != MAINBUSCF_IRQ_DEFAULT || irq != mb->mb_irq in armperiph_match() 155 || intrbase != mb->mb_intrbase) in armperiph_match() 174 struct mainbus_attach_args * const mb = aux; in armperiph_attach() local 188 sc->sc_memt = mb->mb_iot; in armperiph_attach()
|
| /netbsd-src/usr.sbin/wsmoused/ |
| H A D | wsmoused.c | 411 struct mode_bootstrap *mb; in attach_mode() local 424 mb = Avail_Modes[i]; in attach_mode() 425 if (mb != NULL && strcmp(name, mb->mb_name) == 0) { in attach_mode() 428 res = mb->mb_startup(&Mouse); in attach_mode() 431 mb->mb_name); in attach_mode() 434 Modes[pos] = mb; in attach_mode() 473 struct mode_bootstrap *mb; in detach_mode() local 476 mb = Modes[i]; in detach_mode() 477 if (mb != NULL && strcmp(name, mb->mb_name) == 0) { in detach_mode() 480 res = mb->mb_cleanup(); in detach_mode() [all …]
|
| /netbsd-src/sys/nfs/ |
| H A D | nfsm_subs.h | 78 { if ((s) > M_TRAILINGSPACE(mb)) { \ 84 mb->m_next = mb2; \ 85 mb = mb2; \ 86 mb->m_len = 0; \ 87 bpos = mtod(mb, char *); \ 90 mb->m_len += (s); \ 111 if (t2 <= M_TRAILINGSPACE(mb)) { \ 116 } else if ((t2 = nfsm_strtmbuf(&mb, &bpos, \ 392 if ((t1 = nfsm_uiotombuf((p),&mb,(s),&bpos)) != 0) { \ 399 mb [all...] |
| H A D | nfs_subs.c | 582 struct mbuf *mb; in nfsm_reqh() local 585 mb = m_get(M_WAIT, MT_DATA); in nfsm_reqh() 586 MCLAIM(mb, &nfs_mowner); in nfsm_reqh() 588 m_clget(mb, M_WAIT); in nfsm_reqh() 589 mb->m_len = 0; in nfsm_reqh() 590 bpos = mtod(mb, void *); in nfsm_reqh() 594 return (mb); in nfsm_reqh() 609 struct mbuf *mb; in nfsm_rpchead() local 617 mb = m_gethdr(M_WAIT, MT_DATA); in nfsm_rpchead() 618 MCLAIM(mb, &nfs_mowner); in nfsm_rpchead() [all …]
|
| /netbsd-src/sys/ddb/ |
| H A D | db_xxx.c | 258 struct kern_msgbuf mb, *mbp; in db_dmesg() local 268 db_read_bytes((db_addr_t)mbp, sizeof(mb), (char *)&mb); in db_dmesg() 269 if (mb.msg_magic != MSG_MAGIC) { in db_dmesg() 276 if (haddr && addr < mb.msg_bufs) in db_dmesg() 279 print = mb.msg_bufs; in db_dmesg() 281 for (newl = skip = i = 0, p = bufdata + mb.msg_bufx; in db_dmesg() 282 i < mb.msg_bufs; i++, p++) { in db_dmesg() 283 if (p == bufdata + mb.msg_bufs) in db_dmesg() 285 if (i < mb.msg_bufs - print) { in db_dmesg()
|
| /netbsd-src/sys/dev/i2o/ |
| H A D | iop.c | 972 u_int32_t mb[IOP_MAX_MSG_SIZE / sizeof(u_int32_t)], *sw; in iop_ofifo_init() local 976 mf = (struct i2o_exec_outbound_init *)mb; in iop_ofifo_init() 990 mb[sizeof(*mf) / sizeof(u_int32_t) + 0] = sizeof(*sw) | in iop_ofifo_init() 992 mb[sizeof(*mf) / sizeof(u_int32_t) + 1] = in iop_ofifo_init() 994 mb[0] += 2 << 16; in iop_ofifo_init() 1002 if ((rv = iop_post(sc, mb)) != 0) in iop_ofifo_init() 1073 u_int32_t mb[IOP_MAX_MSG_SIZE / sizeof(u_int32_t)]; in iop_hrt_get0() local 1076 mf = (struct i2o_exec_hrt_get *)mb; in iop_hrt_get0() 1082 iop_msg_map(sc, im, mb, hrt, size, 0, NULL); in iop_hrt_get0() 1083 rv = iop_msg_post(sc, im, mb, 30000); in iop_hrt_get0() [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/ |
| H A D | drm_cache.c | 70 mb(); /*Full memory barrier used before so that CLFLUSH is ordered*/ in drm_cache_flush_clflush() 73 mb(); /*Also used after CLFLUSH so that all cache is flushed*/ in drm_cache_flush_clflush() 134 mb(); /*CLFLUSH is ordered only by using memory barriers*/ in drm_clflush_sg() 137 mb(); /*Make sure that all cache line entry is flushed*/ in drm_clflush_sg() 172 mb(); /*CLFLUSH is only ordered with a full memory barrier*/ in drm_clflush_virt_range() 176 mb(); /*Ensure that evry data cache line entry is flushed*/ in drm_clflush_virt_range()
|
| /netbsd-src/sys/dev/bluetooth/ |
| H A D | btmagic.c | 1203 uint32_t mb; in btmagic_input_basic() local 1215 mb = 0; in btmagic_input_basic() 1217 mb |= __BIT(0); in btmagic_input_basic() 1219 mb |= __BIT(2); in btmagic_input_basic() 1221 if (dx != 0 || dy != 0 || mb != sc->sc_mb) { in btmagic_input_basic() 1222 sc->sc_mb = mb; in btmagic_input_basic() 1225 wsmouse_input(sc->sc_wsmouse, mb, in btmagic_input_basic() 1315 uint32_t mb; in btmagic_input_magicm() local 1331 mb = 0; in btmagic_input_magicm() 1333 mb |= __BIT(0); in btmagic_input_magicm() [all …]
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/rs6000/ |
| H A D | ppu_intrinsics.h | 659 #define __rldcl(a,b,mb) __extension__ \ argument 662 __asm__ ("rldcl %0,%1,%2,%3" : "=r" (d) : "r" (a), "r" (b), "i" (mb)); \ 673 #define __rldic(a,sh,mb) __extension__ \ argument 676 __asm__ ("rldic %0,%1,%2,%3" : "=r" (d) : "r" (a), "i" (sh), "i" (mb)); \ 680 #define __rldicl(a,sh,mb) __extension__ \ argument 683 __asm__ ("rldicl %0,%1,%2,%3" : "=r" (d) : "r" (a), "i" (sh), "i" (mb)); \ 694 #define __rldimi(a,b,sh,mb) __extension__ \ argument 697 __asm__ ("rldimi %0,%1,%2,%3" : "=r" (d) : "r" (b), "i" (sh), "i" (mb), "0" (a)); \ 702 #define __rlwimi(a,b,sh,mb,me) __extension__ \ argument 705 __asm__ ("rlwimi %0,%1,%2,%3,%4" : "=r" (d) : "r" (b), "i" (sh), "i" (mb), "i" (me), "0" (a)); \ [all …]
|