@@ -35,4 +35,162 @@ HEXAGONRPC_DEFINE_REMOTE_METHOD(27, apps_std_closedir, 2, 0, 0, 0)
3535HEXAGONRPC_DEFINE_REMOTE_METHOD(28, apps_std_readdir, 2, 0, 66, 0)
3636HEXAGONRPC_DEFINE_REMOTE_METHOD(31, apps_std_stat, 1, 1, 24, 0)
3737
38+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(1, apps_std3_freopen, true,
39+ 0, HEXAGONRPC_DELIMITER, 0, 1)
40+
41+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(2, apps_std3_fflush, false,
42+ 0, HEXAGONRPC_DELIMITER)
43+
44+ static inline int apps_std3_fflush(struct fastrpc_context *ctx, uint32_t stream)
45+ {
46+ return hexagonrpc(&apps_std3_fflush_def, ctx, stream);
47+ }
48+
49+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(3, apps_std3_fclose, false,
50+ 0, HEXAGONRPC_DELIMITER)
51+
52+ static inline int apps_std3_fclose(struct fastrpc_context *ctx, uint32_t stream)
53+ {
54+ return hexagonrpc(&apps_std3_fclose_def, ctx, stream);
55+ }
56+
57+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(4, apps_std3_fread, true,
58+ 0, HEXAGONRPC_DELIMITER, 0, 0, 1)
59+
60+ static inline int apps_std3_fread(struct fastrpc_context *ctx,
61+ uint32_t stream,
62+ uint32_t *written, uint32_t *is_eof,
63+ uint32_t size, void *buf)
64+ {
65+ return hexagonrpc(&apps_std3_fread_def, ctx,
66+ stream, written, is_eof, size, buf);
67+ }
68+
69+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(9, apps_std3_fseek, false,
70+ 0, 0, 0, HEXAGONRPC_DELIMITER)
71+
72+ static inline int apps_std3_fseek(struct fastrpc_context *ctx,
73+ uint32_t stream, uint32_t pos, uint32_t whence)
74+ {
75+ return hexagonrpc(&apps_std3_fseek_def, ctx, stream, pos, whence);
76+ }
77+
78+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(19, apps_std3_fopen_with_env, true,
79+ 1, 1, 1, 1, HEXAGONRPC_DELIMITER, 0)
80+
81+ static inline int apps_std3_fopen_with_env(struct fastrpc_context *ctx,
82+ uint32_t envvar_len, const char *envvar,
83+ uint32_t delim_len, const char *delim,
84+ uint32_t name_len, const char *name,
85+ uint32_t mode_len, const char *mode)
86+ {
87+ return hexagonrpc(&apps_std3_fopen_with_env_def, ctx,
88+ envvar_len, (const void *) envvar,
89+ delim_len, (const void *) delim,
90+ name_len, (const void *) name,
91+ mode_len, (const void *) mode);
92+ }
93+
94+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(26, apps_std3_opendir, true,
95+ 1, HEXAGONRPC_DELIMITER, 0, 0)
96+
97+ static inline int apps_std3_opendir(struct fastrpc_context *ctx,
98+ uint32_t path_len, const char *path,
99+ uint32_t *handle_lo, uint32_t *handle_hi)
100+ {
101+ return hexagonrpc(&apps_std3_opendir_def, ctx,
102+ path_len, (const void *) path,
103+ handle_lo, handle_hi);
104+ }
105+
106+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(27, apps_std3_closedir, false,
107+ 0, 0, HEXAGONRPC_DELIMITER)
108+
109+ static inline int apps_std3_closedir(struct fastrpc_context *ctx,
110+ uint32_t handle_lo, uint32_t handle_hi)
111+ {
112+ return hexagonrpc(&apps_std3_closedir_def, ctx, handle_lo, handle_hi);
113+ }
114+
115+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(28, apps_std3_readdir, true,
116+ 0, 0, HEXAGONRPC_DELIMITER,
117+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
118+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
119+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
120+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
121+ 0, 0)
122+
123+ static inline int apps_std3_readdir(struct fastrpc_context *ctx,
124+ uint32_t handle_lo, uint32_t handle_hi,
125+ uint32_t *inode, char *path, uint32_t *eof)
126+ {
127+ uint32_t *buf = (uint32_t *) path;
128+
129+ return hexagonrpc(&apps_std3_readdir_def, ctx,
130+ handle_lo, handle_hi, inode,
131+ &buf[0], &buf[1], &buf[2], &buf[3],
132+ &buf[4], &buf[5], &buf[6], &buf[7],
133+ &buf[8], &buf[9], &buf[10], &buf[11],
134+ &buf[12], &buf[13], &buf[14], &buf[15],
135+ &buf[16], &buf[17], &buf[18], &buf[19],
136+ &buf[20], &buf[21], &buf[22], &buf[23],
137+ &buf[24], &buf[25], &buf[26], &buf[27],
138+ &buf[28], &buf[29], &buf[30], &buf[31],
139+ &buf[32], &buf[33], &buf[34], &buf[35],
140+ &buf[36], &buf[37], &buf[38], &buf[39],
141+ &buf[40], &buf[41], &buf[42], &buf[43],
142+ &buf[44], &buf[45], &buf[46], &buf[47],
143+ &buf[48], &buf[49], &buf[50], &buf[51],
144+ &buf[52], &buf[53], &buf[54], &buf[55],
145+ &buf[56], &buf[57], &buf[58], &buf[57],
146+ &buf[60], &buf[61], &buf[62], &buf[63], eof);
147+ }
148+
149+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(29, apps_std3_mkdir, false,
150+ 1, 0, HEXAGONRPC_DELIMITER)
151+
152+ static inline int apps_std3_mkdir(struct fastrpc_context *ctx,
153+ uint32_t path_size, const char *path,
154+ uint32_t mode)
155+ {
156+ return hexagonrpc(&apps_std3_mkdir_def, ctx,
157+ path_size, (const void *) path, mode);
158+ }
159+
160+ HEXAGONRPC_DEFINE_REMOTE_METHOD3(31, apps_std3_stat, true,
161+ 1, HEXAGONRPC_DELIMITER,
162+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
163+ 0, 0, 0, 0, 0, 0, 0, 0)
164+
165+ static inline int apps_std3_stat(struct fastrpc_context *ctx,
166+ uint32_t path_size, const char *path,
167+ uint32_t *tsz_lo, uint32_t *tsz_hi,
168+ uint32_t *dev_lo, uint32_t *dev_hi,
169+ uint32_t *ino_lo, uint32_t *ino_hi,
170+ uint32_t *mode, uint32_t *nlink,
171+ uint32_t *rdev_lo, uint32_t *rdev_hi,
172+ uint32_t *size_lo, uint32_t *size_hi,
173+ uint32_t *atime_sec_lo, uint32_t *atime_sec_hi,
174+ uint32_t *atime_nsec_lo, uint32_t *atime_nsec_hi,
175+ uint32_t *mtime_sec_lo, uint32_t *mtime_sec_hi,
176+ uint32_t *mtime_nsec_lo, uint32_t *mtime_nsec_hi,
177+ uint32_t *ctime_sec_lo, uint32_t *ctime_sec_hi,
178+ uint32_t *ctime_nsec_lo, uint32_t *ctime_nsec_hi)
179+ {
180+ return hexagonrpc(&apps_std3_stat_def, ctx,
181+ path_size, (const void *) path,
182+ tsz_lo, tsz_hi,
183+ dev_lo, dev_hi,
184+ ino_lo, ino_hi,
185+ mode, nlink,
186+ rdev_lo, rdev_hi,
187+ size_lo, size_hi,
188+ atime_sec_lo, atime_sec_hi,
189+ atime_nsec_lo, atime_nsec_hi,
190+ mtime_sec_lo, mtime_sec_hi,
191+ mtime_nsec_lo, mtime_nsec_hi,
192+ ctime_sec_lo, ctime_sec_hi,
193+ ctime_nsec_lo, ctime_nsec_hi);
194+ }
195+
38196#endif /* INTERFACE_APPS_STD_DEF */
0 commit comments