Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 102) sorted by relevance

12345

/picolibc-latest/semihost/fake/
Dfake_stub.c45 read(int fd, void *buf, size_t count) in read() argument
47 (void) fd; in read()
54 write(int fd, const void *buf, size_t count) in write() argument
56 (void) fd; in write()
70 close(int fd) in close() argument
72 (void) fd; in close()
76 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
78 (void) fd; in lseek()
84 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
86 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/semihost/machine/powerpc/
Dpowerpc_stub.c46 read(int fd, void *buf, size_t count) in read() argument
48 (void) fd; in read()
55 write(int fd, const void *buf, size_t count) in write() argument
57 (void) fd; in write()
71 close(int fd) in close() argument
73 (void) fd; in close()
77 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
79 (void) fd; in lseek()
85 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
87 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/semihost/machine/x86/
De9_stub.c45 read(int fd, void *buf, size_t count) in read() argument
47 (void) fd; in read()
54 write(int fd, const void *buf, size_t count) in write() argument
59 (void) fd; in write()
75 close(int fd) in close() argument
77 (void) fd; in close()
81 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
83 (void) fd; in lseek()
89 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
91 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/semihost/machine/mips/
Dmips_stub.c40 read(int fd, void *buf, size_t count) in read() argument
42 (void) fd; in read()
49 write(int fd, const void *buf, size_t count) in write() argument
54 (void) fd; in write()
69 close(int fd) in close() argument
71 (void) fd; in close()
75 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
77 (void) fd; in lseek()
83 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
85 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/semihost/machine/msp430/
Dmsp430-stub.c46 read(int fd, void *buf, size_t count) in read() argument
48 (void) fd; in read()
55 write(int fd, const void *buf, size_t count) in write() argument
60 (void) fd; in write()
75 close(int fd) in close() argument
77 (void) fd; in close()
81 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
83 (void) fd; in lseek()
89 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
91 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/semihost/machine/sparc/
Dsparc_stub.c40 read(int fd, void *buf, size_t count) in read() argument
42 (void) fd; in read()
49 write(int fd, const void *buf, size_t count) in write() argument
54 (void) fd; in write()
69 close(int fd) in close() argument
71 (void) fd; in close()
75 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
77 (void) fd; in lseek()
83 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
85 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/semihost/machine/sh/
Dsh_stub.c46 read(int fd, void *buf, size_t count) in read() argument
49 (void) fd; in read()
56 write(int fd, const void *buf, size_t count) in write() argument
61 (void) fd; in write()
76 close(int fd) in close() argument
78 (void) fd; in close()
82 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
84 (void) fd; in lseek()
90 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
92 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-latest/newlib/libc/tinystdio/
Dmktemp.c152 int fd = open(path, O_RDONLY); in _gettemp() local
153 if (fd < 0) { in _gettemp()
159 fd = open (path, flags | O_CREAT | O_EXCL | O_RDWR, in _gettemp()
161 if (fd >= 0) { in _gettemp()
162 *doopen = fd; in _gettemp()
172 close(fd); in _gettemp()
180 int fd; in mkstemp() local
182 return (_gettemp (template, 0, &fd, 0) ? fd : -1); in mkstemp()
201 int fd; in mkstemps() local
203 return (_gettemp (template, suffixlen, &fd, O_BINARY) ? fd : -1); in mkstemps()
[all …]
Dtmpfile.c41 int fd; in tmpfile() local
45 fd = mkstemp(tmpnam); in tmpfile()
46 if (fd < 0) in tmpfile()
50 f = fdopen(fd, "w+"); in tmpfile()
52 close(fd); in tmpfile()
/picolibc-latest/test/semihost/
Dsemihost-flen.c46 int fd; in main() local
52 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
53 if (fd < 0) { in main()
57 not_written = sys_semihost_write(fd, TEST_STRING, TEST_STRING_LEN); in main()
63 ret = sys_semihost_close(fd); in main()
64 fd = -1; in main()
70 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
71 if (fd < 0) { in main()
76 len = sys_semihost_flen(fd); in main()
83 if (fd >= 0) in main()
[all …]
Dsemihost-rename.c45 int fd; in main() local
49 fd = sys_semihost_open(TEST_FILE_NAME_1, SH_OPEN_W); in main()
50 if (fd < 0) { in main()
54 ret = sys_semihost_close(fd); in main()
55 fd = -1; in main()
69 fd = sys_semihost_open(TEST_FILE_NAME_1, SH_OPEN_R); in main()
70 if (fd >= 0) { in main()
75 fd = sys_semihost_open(TEST_FILE_NAME_2, SH_OPEN_R); in main()
76 if (fd < 0) { in main()
82 if (fd >= 0) in main()
[all …]
Dsemihost-open.c44 int fd; in main() local
48 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
49 if (fd < 0) { in main()
53 ret = sys_semihost_close(fd); in main()
54 fd = -1; in main()
60 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
61 if (fd < 0) { in main()
67 if (fd >= 0) in main()
68 (void) sys_semihost_close(fd); in main()
Dsemihost-seek.c48 int fd; in main() local
55 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
56 if (fd < 0) { in main()
60 not_written = sys_semihost_write(fd, TEST_STRING, TEST_STRING_LEN); in main()
66 ret = sys_semihost_close(fd); in main()
67 fd = -1; in main()
74 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
75 if (fd < 0) { in main()
81 ret = sys_semihost_seek(fd, TEST_SEEK_POS); in main()
88 not_read = sys_semihost_read(fd, buf, sizeof(buf)); in main()
[all …]
Dsemihost-read.c47 int fd; in main() local
54 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
55 if (fd < 0) { in main()
59 not_written = sys_semihost_write(fd, TEST_STRING, TEST_STRING_LEN); in main()
65 ret = sys_semihost_close(fd); in main()
66 fd = -1; in main()
72 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
73 if (fd < 0) { in main()
78 not_read = sys_semihost_read(fd, buf, sizeof(buf)); in main()
91 if (fd >= 0) in main()
[all …]
Dsemihost-write.c47 int fd; in main() local
54 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
55 if (fd < 0) { in main()
59 not_written = sys_semihost_write(fd, TEST_STRING, TEST_STRING_LEN); in main()
65 ret = sys_semihost_close(fd); in main()
66 fd = -1; in main()
72 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
73 if (fd < 0) { in main()
78 not_read = sys_semihost_read(fd, buf, sizeof(buf)); in main()
91 if (fd >= 0) in main()
[all …]
Dsemihost-remove.c44 int fd; in main() local
48 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
49 if (fd < 0) { in main()
53 ret = sys_semihost_close(fd); in main()
54 fd = -1; in main()
66 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
67 if (fd >= 0) { in main()
79 if (fd >= 0) in main()
80 (void) sys_semihost_close(fd); in main()
Dsemihost-istty.c44 int fd; in main() local
48 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
49 if (fd < 0) { in main()
53 ret = sys_semihost_istty(fd); in main()
59 if (fd >= 0) in main()
60 (void) sys_semihost_close(fd); in main()
/picolibc-latest/semihost/
Dfstat.c49 fstat (int fd, struct stat *sbuf ) in fstat() argument
51 fd = _map_stdio(fd); in fstat()
55 if (fd > 0) in fstat()
56 size = sys_semihost_flen(fd); in fstat()
76 fstat64 (int fd, struct stat64 *sbuf ) in fstat64() argument
78 fd = _map_stdio(fd); in fstat64()
82 if (fd > 0) in fstat64()
83 size = sys_semihost_flen(fd); in fstat64()
Disatty.c45 isatty (int fd) in isatty() argument
47 fd = _map_stdio(fd); in isatty()
49 if (fd < 0) in isatty()
52 int size = sys_semihost_flen(fd); in isatty()
Dlseek.c43 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
49 int flen = sys_semihost_flen(fd); in lseek()
56 fd = _map_stdio(fd); in lseek()
58 if (whence != SEEK_SET || fd < 0) { in lseek()
63 uintptr_t ret = sys_semihost2(SYS_SEEK, fd, offset); in lseek()
/picolibc-latest/newlib/libc/stdio/
Dmktemp.c267 int fd; in mkstemp() local
269 return (_gettemp (path, &fd, 0, 0, O_BINARY) ? fd : -1); in mkstemp()
285 int fd; in mkstemps() local
287 return (_gettemp (path, &fd, 0, len, O_BINARY) ? fd : -1); in mkstemps()
295 int fd; in mkostemp() local
297 return (_gettemp (path, &fd, 0, 0, flags & ~O_ACCMODE) ? fd : -1); in mkostemp()
306 int fd; in mkostemps() local
308 return (_gettemp (path, &fd, 0, len, flags & ~O_ACCMODE) ? fd : -1); in mkostemps()
Dtmpfile.c75 int fd; in tmpfile() local
81 fd = open (f, O_RDWR | O_CREAT | O_EXCL | O_BINARY, in tmpfile()
84 while (fd < 0 && _REENT_ERRNO(ptr) == EEXIST); in tmpfile()
85 if (fd < 0) in tmpfile()
87 fp = fdopen ( fd, "wb+"); in tmpfile()
90 close (fd); in tmpfile()
/picolibc-latest/newlib/testsuite/newlib.elix/
Dtmmap.c17 int fd; in main() local
22 fd = open("my.file", O_CREAT | O_TRUNC | O_RDWR, 0644); in main()
24 CHECK (fd != -1); in main()
26 CHECK (write (fd, "abcdefgh", 8) == 8); in main()
28 x = (char *)mmap (0, 20, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main()
36 CHECK (close(fd) != -1); in main()
/picolibc-latest/newlib/libc/machine/nvptx/
Dmisc.c27 close(int fd) { in close() argument
32 fstat (int fd, struct stat *buf) { in fstat() argument
47 isatty (int fd) { in isatty() argument
48 return fd == 1; in isatty()
58 lseek(int fd, off_t offset, int whence) { in lseek() argument
68 read(int fd, void *buf, size_t count) { in read() argument
/picolibc-latest/newlib/libc/stdio64/
Dtmpfile64.c79 int fd; in tmpfile64() local
85 fd = open64 (f, O_RDWR | O_CREAT | O_EXCL | O_BINARY, in tmpfile64()
88 while (fd < 0 && _REENT_ERRNO(ptr) == EEXIST); in tmpfile64()
89 if (fd < 0) in tmpfile64()
91 fp = fdopen64 (fd, "wb+"); in tmpfile64()
94 close (fd); in tmpfile64()

12345