Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions chrecd/interfaces/chre_slpi.def
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,18 @@
HEXAGONRPC_DEFINE_REMOTE_METHOD(0, chre_slpi_start_thread, 0, 0, 0, 0)
HEXAGONRPC_DEFINE_REMOTE_METHOD(1, chre_slpi_wait_on_thread_exit, 0, 0, 0, 0)

HEXAGONRPC_DEFINE_REMOTE_METHOD3_EMPTY(0, chre_slpi3_start_thread)

static inline int chre_slpi3_start_thread(const struct fastrpc_context *ctx)
{
return hexagonrpc(&chre_slpi3_start_thread_def, ctx);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3_EMPTY(1, chre_slpi3_wait_on_thread_exit)

static inline int chre_slpi3_wait_on_thread_exit(const struct fastrpc_context *ctx)
{
return hexagonrpc(&chre_slpi3_wait_on_thread_exit_def, ctx);
}

#endif /* INTERFACE_CHRE_SLPI_DEF */
20 changes: 10 additions & 10 deletions hexagonrpcd/apps_std.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
*/

#include <errno.h>
#include <libhexagonrpc/error.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>

#include "aee_error.h"
#include "interfaces/apps_std.def"
#include "hexagonfs.h"
#include "iobuffer.h"
Expand Down Expand Up @@ -408,23 +408,23 @@ static const struct fastrpc_function_impl apps_std_procs[] = {
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{
.def = &apps_std_fflush_def,
.def = &apps_std3_fflush_def,
.impl = apps_std_fflush,
},
{
.def = &apps_std_fclose_def,
.def = &apps_std3_fclose_def,
.impl = apps_std_fclose,
},
{
.def = &apps_std_fread_def,
.def = &apps_std3_fread_def,
.impl = apps_std_fread,
},
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{
.def = &apps_std_fseek_def,
.def = &apps_std3_fseek_def,
.impl = apps_std_fseek,
},
{ .def = NULL, .impl = NULL, },
Expand All @@ -437,7 +437,7 @@ static const struct fastrpc_function_impl apps_std_procs[] = {
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{
.def = &apps_std_fopen_with_env_def,
.def = &apps_std3_fopen_with_env_def,
.impl = apps_std_fopen_with_env,
},
{ .def = NULL, .impl = NULL, },
Expand All @@ -447,21 +447,21 @@ static const struct fastrpc_function_impl apps_std_procs[] = {
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{
.def = &apps_std_opendir_def,
.def = &apps_std3_opendir_def,
.impl = apps_std_opendir,
},
{
.def = &apps_std_closedir_def,
.def = &apps_std3_closedir_def,
.impl = apps_std_closedir,
},
{
.def = &apps_std_readdir_def,
.def = &apps_std3_readdir_def,
.impl = apps_std_readdir,
},
{ .def = NULL, .impl = NULL, },
{ .def = NULL, .impl = NULL, },
{
.def = &apps_std_stat_def,
.def = &apps_std3_stat_def,
.impl = apps_std_stat,
},
};
Expand Down
7 changes: 7 additions & 0 deletions hexagonrpcd/interfaces/adsp_default_listener.def
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@

HEXAGONRPC_DEFINE_REMOTE_METHOD(0, adsp_default_listener_register, 0, 0, 0, 0)

HEXAGONRPC_DEFINE_REMOTE_METHOD3_EMPTY(0, adsp_default_listener3_register)

static inline int adsp_default_listener3_register(const struct fastrpc_context *ctx)
{
return hexagonrpc(&adsp_default_listener3_register_def, ctx);
}

#endif /* INTERFACE_ADSP_DEFAULT_LISTENER_DEF */
25 changes: 25 additions & 0 deletions hexagonrpcd/interfaces/adsp_listener.def
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,29 @@
HEXAGONRPC_DEFINE_REMOTE_METHOD(3, adsp_listener_init2, 0, 0, 0, 0)
HEXAGONRPC_DEFINE_REMOTE_METHOD(4, adsp_listener_next2, 2, 1, 4, 1)

HEXAGONRPC_DEFINE_REMOTE_METHOD3_EMPTY(3, adsp_listener3_init2)

static inline int adsp_listener3_init2(int fd)
{
return hexagonrpc2(&adsp_listener3_init2_def, fd, ADSP_LISTENER_HANDLE);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(4, adsp_listener3_next2, true,
0, 0, 1, HEXAGONRPC_DELIMITER, 0, 0, 0, 0, 1)

static inline int adsp_listener3_next2(int fd,
uint32_t ret_rctx,
uint32_t ret_res,
uint32_t ret_outbufs_len, const void *ret_outbufs,
uint32_t *rctx,
uint32_t *handle,
uint32_t *sc,
uint32_t *inbufs_len,
uint32_t inbufs_size, void *inbufs)
{
return hexagonrpc2(&adsp_listener3_next2_def, fd, ADSP_LISTENER_HANDLE,
ret_rctx, ret_res, ret_outbufs_len, ret_outbufs,
rctx, handle, sc, inbufs_len, inbufs_size, inbufs);
}

#endif /* INTERFACE_ADSP_LISTENER_DEF */
158 changes: 158 additions & 0 deletions hexagonrpcd/interfaces/apps_std.def
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,162 @@ HEXAGONRPC_DEFINE_REMOTE_METHOD(27, apps_std_closedir, 2, 0, 0, 0)
HEXAGONRPC_DEFINE_REMOTE_METHOD(28, apps_std_readdir, 2, 0, 66, 0)
HEXAGONRPC_DEFINE_REMOTE_METHOD(31, apps_std_stat, 1, 1, 24, 0)

HEXAGONRPC_DEFINE_REMOTE_METHOD3(1, apps_std3_freopen, true,
0, HEXAGONRPC_DELIMITER, 0, 1)

HEXAGONRPC_DEFINE_REMOTE_METHOD3(2, apps_std3_fflush, false,
0, HEXAGONRPC_DELIMITER)

static inline int apps_std3_fflush(struct fastrpc_context *ctx, uint32_t stream)
{
return hexagonrpc(&apps_std3_fflush_def, ctx, stream);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(3, apps_std3_fclose, false,
0, HEXAGONRPC_DELIMITER)

static inline int apps_std3_fclose(struct fastrpc_context *ctx, uint32_t stream)
{
return hexagonrpc(&apps_std3_fclose_def, ctx, stream);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(4, apps_std3_fread, true,
0, HEXAGONRPC_DELIMITER, 0, 0, 1)

static inline int apps_std3_fread(struct fastrpc_context *ctx,
uint32_t stream,
uint32_t *written, uint32_t *is_eof,
uint32_t size, void *buf)
{
return hexagonrpc(&apps_std3_fread_def, ctx,
stream, written, is_eof, size, buf);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(9, apps_std3_fseek, false,
0, 0, 0, HEXAGONRPC_DELIMITER)

static inline int apps_std3_fseek(struct fastrpc_context *ctx,
uint32_t stream, uint32_t pos, uint32_t whence)
{
return hexagonrpc(&apps_std3_fseek_def, ctx, stream, pos, whence);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(19, apps_std3_fopen_with_env, true,
1, 1, 1, 1, HEXAGONRPC_DELIMITER, 0)

static inline int apps_std3_fopen_with_env(struct fastrpc_context *ctx,
uint32_t envvar_len, const char *envvar,
uint32_t delim_len, const char *delim,
uint32_t name_len, const char *name,
uint32_t mode_len, const char *mode)
{
return hexagonrpc(&apps_std3_fopen_with_env_def, ctx,
envvar_len, (const void *) envvar,
delim_len, (const void *) delim,
name_len, (const void *) name,
mode_len, (const void *) mode);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(26, apps_std3_opendir, true,
1, HEXAGONRPC_DELIMITER, 0, 0)

static inline int apps_std3_opendir(struct fastrpc_context *ctx,
uint32_t path_len, const char *path,
uint32_t *handle_lo, uint32_t *handle_hi)
{
return hexagonrpc(&apps_std3_opendir_def, ctx,
path_len, (const void *) path,
handle_lo, handle_hi);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(27, apps_std3_closedir, false,
0, 0, HEXAGONRPC_DELIMITER)

static inline int apps_std3_closedir(struct fastrpc_context *ctx,
uint32_t handle_lo, uint32_t handle_hi)
{
return hexagonrpc(&apps_std3_closedir_def, ctx, handle_lo, handle_hi);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(28, apps_std3_readdir, true,
0, 0, HEXAGONRPC_DELIMITER,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0)

static inline int apps_std3_readdir(struct fastrpc_context *ctx,
uint32_t handle_lo, uint32_t handle_hi,
uint32_t *inode, char *path, uint32_t *eof)
{
uint32_t *buf = (uint32_t *) path;

return hexagonrpc(&apps_std3_readdir_def, ctx,
handle_lo, handle_hi, inode,
&buf[0], &buf[1], &buf[2], &buf[3],
&buf[4], &buf[5], &buf[6], &buf[7],
&buf[8], &buf[9], &buf[10], &buf[11],
&buf[12], &buf[13], &buf[14], &buf[15],
&buf[16], &buf[17], &buf[18], &buf[19],
&buf[20], &buf[21], &buf[22], &buf[23],
&buf[24], &buf[25], &buf[26], &buf[27],
&buf[28], &buf[29], &buf[30], &buf[31],
&buf[32], &buf[33], &buf[34], &buf[35],
&buf[36], &buf[37], &buf[38], &buf[39],
&buf[40], &buf[41], &buf[42], &buf[43],
&buf[44], &buf[45], &buf[46], &buf[47],
&buf[48], &buf[49], &buf[50], &buf[51],
&buf[52], &buf[53], &buf[54], &buf[55],
&buf[56], &buf[57], &buf[58], &buf[57],
&buf[60], &buf[61], &buf[62], &buf[63], eof);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(29, apps_std3_mkdir, false,
1, 0, HEXAGONRPC_DELIMITER)

static inline int apps_std3_mkdir(struct fastrpc_context *ctx,
uint32_t path_size, const char *path,
uint32_t mode)
{
return hexagonrpc(&apps_std3_mkdir_def, ctx,
path_size, (const void *) path, mode);
}

HEXAGONRPC_DEFINE_REMOTE_METHOD3(31, apps_std3_stat, true,
1, HEXAGONRPC_DELIMITER,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0)

static inline int apps_std3_stat(struct fastrpc_context *ctx,
uint32_t path_size, const char *path,
uint32_t *tsz_lo, uint32_t *tsz_hi,
uint32_t *dev_lo, uint32_t *dev_hi,
uint32_t *ino_lo, uint32_t *ino_hi,
uint32_t *mode, uint32_t *nlink,
uint32_t *rdev_lo, uint32_t *rdev_hi,
uint32_t *size_lo, uint32_t *size_hi,
uint32_t *atime_sec_lo, uint32_t *atime_sec_hi,
uint32_t *atime_nsec_lo, uint32_t *atime_nsec_hi,
uint32_t *mtime_sec_lo, uint32_t *mtime_sec_hi,
uint32_t *mtime_nsec_lo, uint32_t *mtime_nsec_hi,
uint32_t *ctime_sec_lo, uint32_t *ctime_sec_hi,
uint32_t *ctime_nsec_lo, uint32_t *ctime_nsec_hi)
{
return hexagonrpc(&apps_std3_stat_def, ctx,
path_size, (const void *) path,
tsz_lo, tsz_hi,
dev_lo, dev_hi,
ino_lo, ino_hi,
mode, nlink,
rdev_lo, rdev_hi,
size_lo, size_hi,
atime_sec_lo, atime_sec_hi,
atime_nsec_lo, atime_nsec_hi,
mtime_sec_lo, mtime_sec_hi,
mtime_nsec_lo, mtime_nsec_hi,
ctime_sec_lo, ctime_sec_hi,
ctime_nsec_lo, ctime_nsec_hi);
}

#endif /* INTERFACE_APPS_STD_DEF */
Loading