Home
last modified time | relevance | path

Searched refs:wbuf (Results 1 – 25 of 42) sorted by relevance

12

/external/u-boot/fs/ubifs/
Dio.c442 struct ubifs_wbuf *wbuf = container_of(timer, struct ubifs_wbuf, timer); in wbuf_timer_callback_nolock() local
444 dbg_io("jhead %s", dbg_jhead(wbuf->jhead)); in wbuf_timer_callback_nolock()
445 wbuf->need_sync = 1; in wbuf_timer_callback_nolock()
446 wbuf->c->need_wbuf_sync = 1; in wbuf_timer_callback_nolock()
447 ubifs_wake_up_bgt(wbuf->c); in wbuf_timer_callback_nolock()
455 static void new_wbuf_timer_nolock(struct ubifs_wbuf *wbuf) in new_wbuf_timer_nolock() argument
457 ubifs_assert(!hrtimer_active(&wbuf->timer)); in new_wbuf_timer_nolock()
459 if (wbuf->no_timer) in new_wbuf_timer_nolock()
462 dbg_jhead(wbuf->jhead), in new_wbuf_timer_nolock()
463 div_u64(ktime_to_ns(wbuf->softlimit), USEC_PER_SEC), in new_wbuf_timer_nolock()
[all …]
Dgc.c74 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in switch_gc_head() local
78 wbuf->lnum, wbuf->offs + wbuf->used, gc_lnum, in switch_gc_head()
79 c->leb_size - wbuf->offs - wbuf->used); in switch_gc_head()
81 err = ubifs_wbuf_sync_nolock(wbuf); in switch_gc_head()
93 err = ubifs_wbuf_sync_nolock(wbuf); in switch_gc_head()
102 err = ubifs_wbuf_seek_nolock(wbuf, gc_lnum, 0); in switch_gc_head()
312 struct ubifs_scan_node *snod, struct ubifs_wbuf *wbuf) in move_node() argument
314 int err, new_lnum = wbuf->lnum, new_offs = wbuf->offs + wbuf->used; in move_node()
317 err = ubifs_wbuf_write_nolock(wbuf, snod->node, snod->len); in move_node()
343 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in move_nodes() local
[all …]
Dmisc.h125 static inline int ubifs_wbuf_sync(struct ubifs_wbuf *wbuf) in ubifs_wbuf_sync() argument
129 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_wbuf_sync()
130 err = ubifs_wbuf_sync_nolock(wbuf); in ubifs_wbuf_sync()
131 mutex_unlock(&wbuf->io_mutex); in ubifs_wbuf_sync()
Dlog.c82 return &c->jheads[jhead].wbuf; in ubifs_get_wbuf()
302 struct ubifs_wbuf *wbuf; in remove_buds() local
306 wbuf = &c->jheads[bud->jhead].wbuf; in remove_buds()
308 if (wbuf->lnum == bud->lnum) { in remove_buds()
313 c->cmt_bud_bytes += wbuf->offs - bud->start; in remove_buds()
316 wbuf->offs - bud->start, c->cmt_bud_bytes); in remove_buds()
317 bud->start = wbuf->offs; in remove_buds()
380 int lnum = c->jheads[i].wbuf.lnum; in ubifs_log_start_commit()
381 int offs = c->jheads[i].wbuf.offs; in ubifs_log_start_commit()
Drecovery.c1169 struct ubifs_wbuf *wbuf = &c->jheads[GCHD].wbuf; in ubifs_rcvry_gc_commit() local
1173 dbg_rcvry("GC head LEB %d, offs %d", wbuf->lnum, wbuf->offs); in ubifs_rcvry_gc_commit()
1176 if (wbuf->lnum == -1 || wbuf->offs == c->leb_size) in ubifs_rcvry_gc_commit()
1179 err = ubifs_find_dirty_leb(c, &lp, wbuf->offs, 2); in ubifs_rcvry_gc_commit()
1189 ubifs_assert(lp.free + lp.dirty >= wbuf->offs); in ubifs_rcvry_gc_commit()
1201 mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead); in ubifs_rcvry_gc_commit()
1204 int err2 = ubifs_wbuf_sync_nolock(wbuf); in ubifs_rcvry_gc_commit()
1209 mutex_unlock(&wbuf->io_mutex); in ubifs_rcvry_gc_commit()
Dtnc_misc.c454 struct ubifs_wbuf *wbuf; in ubifs_tnc_read_node() local
460 wbuf = ubifs_get_wbuf(c, zbr->lnum); in ubifs_tnc_read_node()
461 if (wbuf) in ubifs_tnc_read_node()
462 err = ubifs_read_node_wbuf(wbuf, node, type, zbr->len, in ubifs_tnc_read_node()
Dtnc.c1634 static int read_wbuf(struct ubifs_wbuf *wbuf, void *buf, int len, int lnum, in read_wbuf() argument
1637 const struct ubifs_info *c = wbuf->c; in read_wbuf()
1641 ubifs_assert(wbuf && lnum >= 0 && lnum < c->leb_cnt && offs >= 0); in read_wbuf()
1645 spin_lock(&wbuf->lock); in read_wbuf()
1646 overlap = (lnum == wbuf->lnum && offs + len > wbuf->offs); in read_wbuf()
1649 spin_unlock(&wbuf->lock); in read_wbuf()
1654 rlen = wbuf->offs - offs; in read_wbuf()
1659 memcpy(buf + rlen, wbuf->buf + offs + rlen - wbuf->offs, len - rlen); in read_wbuf()
1660 spin_unlock(&wbuf->lock); in read_wbuf()
1736 struct ubifs_wbuf *wbuf; in ubifs_tnc_bulk_read() local
[all …]
Dubifs.h1327 struct ubifs_wbuf wbuf; member
2093 int ubifs_wbuf_write_nolock(struct ubifs_wbuf *wbuf, void *buf, int len);
2094 int ubifs_wbuf_seek_nolock(struct ubifs_wbuf *wbuf, int lnum, int offs);
2095 int ubifs_wbuf_init(struct ubifs_info *c, struct ubifs_wbuf *wbuf);
2098 int ubifs_read_node_wbuf(struct ubifs_wbuf *wbuf, void *buf, int type, int len,
2108 int ubifs_wbuf_sync_nolock(struct ubifs_wbuf *wbuf);
2110 void ubifs_wbuf_add_ino_nolock(struct ubifs_wbuf *wbuf, ino_t inum);
/external/python/cpython3/Parser/
Dmyreadline.c108 wchar_t *wbuf; in _PyOS_WindowsConsoleReadline() local
114 wbuf = wbuf_local; in _PyOS_WindowsConsoleReadline()
120 if (!ReadConsoleW(hStdIn, &wbuf[total_read], wbuflen - total_read, &n_read, NULL)) { in _PyOS_WindowsConsoleReadline()
147 if (total_read == 0 || wbuf[total_read - 1] == L'\n') { in _PyOS_WindowsConsoleReadline()
151 if (wbuf == wbuf_local) { in _PyOS_WindowsConsoleReadline()
152 wbuf[total_read] = '\0'; in _PyOS_WindowsConsoleReadline()
153 wbuf = (wchar_t*)PyMem_RawMalloc(wbuflen * sizeof(wchar_t)); in _PyOS_WindowsConsoleReadline()
154 if (wbuf) in _PyOS_WindowsConsoleReadline()
155 wcscpy_s(wbuf, wbuflen, wbuf_local); in _PyOS_WindowsConsoleReadline()
162 wchar_t *tmp = PyMem_RawRealloc(wbuf, wbuflen * sizeof(wchar_t)); in _PyOS_WindowsConsoleReadline()
[all …]
/external/ltp/testcases/kernel/syscalls/pwrite/
Dpwrite04.c70 char *wbuf[NBUFS]; in main() local
82 init_buffers(wbuf); in main()
93 if ((nbytes = pwrite(fd, wbuf[0], K1, 0)) != K1) { in main()
113 if ((nbytes = pwrite(fd, wbuf[2], K1, K2)) != K1) { in main()
134 if ((nbytes = write(fd, wbuf[3], K1)) != K1) { in main()
148 if ((nbytes = pwrite(fd, wbuf[1], K1, K1)) != K1) { in main()
187 if ((nbytes = pwrite(fd, wbuf[0], K1, 0)) != K1) { in main()
222 void init_buffers(char *wbuf[]) in init_buffers() argument
227 wbuf[i] = malloc(K1); in init_buffers()
228 if (wbuf[i] == NULL) { in init_buffers()
[all …]
/external/ltp/testcases/kernel/syscalls/write/
Dwrite04.c44 char wbuf[8 * page_size]; in verify_write() local
46 TEST(write(wfd, wbuf, sizeof(wbuf))); in verify_write()
66 char wbuf[17 * page_size]; in setup() local
75 SAFE_WRITE(0, wfd, wbuf, sizeof(wbuf)); in setup()
Dwrite03.c38 static char wbuf[BUFSIZ], rbuf[BUFSIZ]; variable
45 SAFE_WRITE(1, fd, wbuf, 100); in verify_write()
61 if (memcmp(wbuf, rbuf, 100) == 0) in verify_write()
74 memset(wbuf, '0', 100); in setup()
/external/syzkaller/vendor/golang.org/x/net/http2/
Dframe.go286 wbuf []byte member
339 f.wbuf = append(f.wbuf[:0],
354 length := len(f.wbuf) - frameHeaderLen
358 _ = append(f.wbuf[:0],
366 n, err := f.w.Write(f.wbuf)
367 if err == nil && n != len(f.wbuf) {
382 f.debugFramerBuf.Write(f.wbuf)
391 func (f *Framer) writeByte(v byte) { f.wbuf = append(f.wbuf, v) }
392 func (f *Framer) writeBytes(v []byte) { f.wbuf = append(f.wbuf, v...) }
393 func (f *Framer) writeUint16(v uint16) { f.wbuf = append(f.wbuf, byte(v>>8), byte(v)) }
[all …]
/external/ltp/testcases/kernel/fs/doio/
Dwrite_log.c197 char wbuf[WLOG_REC_MAX_SIZE + 2]; in wlog_record_write() local
207 reclen = wlog_rec_pack(wrec, wbuf, (offset < 0)); in wlog_record_write()
216 wbuf[reclen] = reclen / 256; in wlog_record_write()
217 wbuf[reclen + 1] = reclen % 256; in wlog_record_write()
220 if (write(wfile->w_afd, wbuf, reclen) == -1) { in wlog_record_write()
223 wfile->w_file, wbuf, reclen, strerror(errno)); in wlog_record_write()
241 if ((write(wfile->w_rfd, wbuf, reclen)) == -1) { in wlog_record_write()
244 wfile->w_file, wbuf, reclen, in wlog_record_write()
/external/curl/lib/
Dstrerror.c667 wchar_t wbuf[256]; in Curl_strerror() local
668 wbuf[0] = L'\0'; in Curl_strerror()
671 LANG_NEUTRAL, wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL); in Curl_strerror()
672 wcstombs(buf, wbuf, max); in Curl_strerror()
1043 wchar_t wbuf[256]; in Curl_sspi_strerror() local
1044 wbuf[0] = L'\0'; in Curl_sspi_strerror()
1049 wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL)) { in Curl_sspi_strerror()
1050 wcstombs(msgbuf, wbuf, sizeof(msgbuf)-1); in Curl_sspi_strerror()
/external/libevent/test/
Dregress_iocp.c211 static struct evbuffer *rbuf = NULL, *wbuf = NULL; variable
229 evbuffer_commit_write_(wbuf, nbytes); in write_complete()
254 wbuf = evbuffer_overlapped_new_(data->pair[1]); in test_iocp_evbuffer()
256 evbuffer_enable_locking(wbuf, NULL); in test_iocp_evbuffer()
261 tt_assert(wbuf); in test_iocp_evbuffer()
267 evbuffer_add(wbuf, junk, sizeof(junk)); in test_iocp_evbuffer()
278 tt_assert(!evbuffer_launch_write_(wbuf, 512, &wol)); in test_iocp_evbuffer()
290 evbuffer_free(wbuf); in test_iocp_evbuffer()
/external/python/cpython3/Modules/_io/
Dwinconsoleio.c156 wchar_t wbuf; member
686 wchar_t *wbuf = read_console_w(self->handle, wlen, &n); in readinto() local
687 if (wbuf == NULL) in readinto()
690 PyMem_Free(wbuf); in readinto()
699 if (WideCharToMultiByte(CP_UTF8, 0, wbuf, n, in readinto()
704 u8n = WideCharToMultiByte(CP_UTF8, 0, wbuf, n, in readinto()
717 u8n = WideCharToMultiByte(CP_UTF8, 0, wbuf, n, in readinto()
723 PyMem_Free(wbuf); in readinto()
965 wchar_t *wbuf; in _io__WindowsConsoleIO_write_impl() local
998 wbuf = (wchar_t*)PyMem_Malloc(wlen * sizeof(wchar_t)); in _io__WindowsConsoleIO_write_impl()
[all …]
/external/u-boot/drivers/video/
Dld9040.c64 static void ld9040_spi_write(const unsigned char *wbuf, unsigned int size_cmd) in ld9040_spi_write() argument
76 data_out = wbuf[i] >> 1; in ld9040_spi_write()
79 if (wbuf[i] & 0x01) in ld9040_spi_write()
/external/libcxx/src/
Dlocale.cpp4955 wchar_t wbuf[100]; in __analyze() local
4956 wchar_t* wbb = wbuf; in __analyze()
4959 size_t j = __libcpp_mbsrtowcs_l( wbb, &bb, countof(wbuf), &mb, __loc_); in __analyze()
5129 wchar_t wbuf[100]; in init() local
5139 size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_); in init()
5142 wbe = wbuf + j; in init()
5143 __weeks_[i].assign(wbuf, wbe); in init()
5147 j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_); in init()
5150 wbe = wbuf + j; in init()
5151 __weeks_[i+7].assign(wbuf, wbe); in init()
[all …]
/external/ltp/testcases/kernel/fs/fs-bench/
Dcreate-files.c15 char wbuf[MAXFSIZE]; variable
112 if (write(fd, wbuf, randomsize) < 0) { in create_file()
Drandom-del-create.c96 char wbuf[MAXFSIZE]; in create_file() local
104 if (write(fd, wbuf, randomsize) < 0) { in create_file()
Drandom-access-del-create.c98 char wbuf[MAXFSIZE]; in create_file() local
106 if (write(fd, wbuf, randomsize) < 0) { in create_file()
/external/u-boot/arch/x86/lib/
Dscu.c29 u32 wbuf[4]; member
91 writel(*in++, &regs->wbuf[i]); in scu_ipc_cmd()
/external/python/cpython3/Modules/
Dgetpath.c689 wchar_t* wbuf = Py_DecodeLocale(modPath, &len); in calculate_argv0_path() local
690 if (wbuf == NULL) { in calculate_argv0_path()
694 wcsncpy(calculate->argv0_path, wbuf, MAXPATHLEN); in calculate_argv0_path()
705 wcsncpy(calculate->argv0_path, wbuf, MAXPATHLEN); in calculate_argv0_path()
707 PyMem_RawFree(wbuf); in calculate_argv0_path()
/external/python/cpython3/Python/
Dfileutils.c1547 wchar_t *wbuf; in _Py_wreadlink() local
1565 wbuf = Py_DecodeLocale(cbuf, &r1); in _Py_wreadlink()
1566 if (wbuf == NULL) { in _Py_wreadlink()
1571 PyMem_RawFree(wbuf); in _Py_wreadlink()
1575 wcsncpy(buf, wbuf, bufsiz); in _Py_wreadlink()
1576 PyMem_RawFree(wbuf); in _Py_wreadlink()

12