Home
last modified time | relevance | path

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

12345

/picolibc-3.7.0-3.6.0/semihost/fake/
Dfake_stub.c44 read(int fd, void *buf, size_t count) in read() argument
46 (void) fd; in read()
53 write(int fd, const void *buf, size_t count) in write() argument
55 (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-3.7.0-3.6.0/semihost/machine/powerpc/
Dpowerpc_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-3.7.0-3.6.0/semihost/machine/msp430/
Dmsp430-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()
74 close(int fd) in close() argument
76 (void) fd; in close()
80 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
82 (void) fd; in lseek()
88 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
90 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-3.7.0-3.6.0/semihost/machine/sparc/
Dsparc_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()
74 close(int fd) in close() argument
76 (void) fd; in close()
80 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
82 (void) fd; in lseek()
88 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
90 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-3.7.0-3.6.0/semihost/machine/mips/
Dmips_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()
74 close(int fd) in close() argument
76 (void) fd; in close()
80 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
82 (void) fd; in lseek()
88 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
90 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-3.7.0-3.6.0/semihost/machine/x86/
De9_stub.c44 read(int fd, void *buf, size_t count) in read() argument
46 (void) fd; in read()
53 write(int fd, const void *buf, size_t count) in write() argument
58 (void) fd; in write()
74 close(int fd) in close() argument
76 (void) fd; in close()
80 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
82 (void) fd; in lseek()
88 _off64_t lseek64(int fd, _off64_t offset, int whence) in lseek64() argument
90 return (_off64_t) lseek(fd, (off_t) offset, whence); in lseek64()
[all …]
/picolibc-3.7.0-3.6.0/semihost/machine/sh/
Dsh_stub.c45 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-3.7.0-3.6.0/newlib/libc/tinystdio/
Dmktemp.c127 int fd = open(path, O_RDONLY); in _gettemp() local
128 if (fd < 0) { in _gettemp()
134 fd = open (path, flags | O_CREAT | O_EXCL | O_RDWR, in _gettemp()
136 if (fd >= 0) { in _gettemp()
137 *doopen = fd; in _gettemp()
147 close(fd); in _gettemp()
169 int fd; in mkstemp() local
171 return (_gettemp (template, 0, &fd, 0) ? fd : -1); in mkstemp()
190 int fd; in mkstemps() local
192 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-3.7.0-3.6.0/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-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-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-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()
Dsemihost-iserror.c43 int fd; in main() local
46 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_R); in main()
47 if (!sys_semihost_iserror(fd)) { in main()
51 fd = sys_semihost_open(TEST_FILE_NAME, SH_OPEN_W); in main()
52 if (sys_semihost_iserror(fd)) { in main()
/picolibc-3.7.0-3.6.0/newlib/libc/stdio/
Dmktemp.c268 int fd; in mkstemp() local
270 return (_gettemp (path, &fd, 0, 0, O_BINARY) ? fd : -1); in mkstemp()
286 int fd; in mkstemps() local
288 return (_gettemp (path, &fd, 0, len, O_BINARY) ? fd : -1); in mkstemps()
296 int fd; in mkostemp() local
298 return (_gettemp (path, &fd, 0, 0, flags & ~O_ACCMODE) ? fd : -1); in mkostemp()
307 int fd; in mkostemps() local
309 return (_gettemp (path, &fd, 0, len, flags & ~O_ACCMODE) ? fd : -1); in mkostemps()
Dtmpfile.c76 int fd; in tmpfile() local
82 fd = open (f, O_RDWR | O_CREAT | O_EXCL | O_BINARY, in tmpfile()
85 while (fd < 0 && _REENT_ERRNO(ptr) == EEXIST); in tmpfile()
86 if (fd < 0) in tmpfile()
88 fp = fdopen ( fd, "wb+"); in tmpfile()
91 close (fd); in tmpfile()
/picolibc-3.7.0-3.6.0/semihost/
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()
67 .field1 = fd, in lseek()
/picolibc-3.7.0-3.6.0/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-3.7.0-3.6.0/newlib/libc/machine/nvptx/
Dmisc.c25 close(int fd) { in close() argument
30 fstat (int fd, struct stat *buf) { in fstat() argument
45 isatty (int fd) { in isatty() argument
46 return fd == 1; in isatty()
56 lseek(int fd, off_t offset, int whence) { in lseek() argument
66 read(int fd, void *buf, size_t count) { in read() argument
/picolibc-3.7.0-3.6.0/newlib/libc/stdio64/
Dtmpfile64.c78 int fd; in tmpfile64() local
84 fd = open64 (f, O_RDWR | O_CREAT | O_EXCL | O_BINARY, in tmpfile64()
87 while (fd < 0 && _REENT_ERRNO(ptr) == EEXIST); in tmpfile64()
88 if (fd < 0) in tmpfile64()
90 fp = fdopen64 (fd, "wb+"); in tmpfile64()
93 close (fd); in tmpfile64()

12345