diff --git a/graphics/nxsu/nx_constructwindow.c b/graphics/nxsu/nx_constructwindow.c index b77025dcfd..0703ab6444 100644 --- a/graphics/nxsu/nx_constructwindow.c +++ b/graphics/nxsu/nx_constructwindow.c @@ -83,14 +83,14 @@ * inheritance: The caller's window structure may include extensions that * are not visible to NX. * - * NOTE: wnd must have been allocated using kmalloc() (or related allocators) + * NOTE: hwnd must have been allocated using kmalloc() (or related allocators) * Once provided to nx_constructwindow() that memory is owned and managed * by NX. On certain error conditions or when the window is closed, NX will * free the window. * * Input Parameters: * handle - The handle returned by nx_connect - * wnd - The pre-allocated window structure. + * hwnd - The pre-allocated window structure. * cb - Callbacks used to process window events * arg - User provided value that will be returned with NX callbacks. * @@ -100,16 +100,17 @@ * ****************************************************************************/ -int nx_constructwindow(NXHANDLE handle, FAR struct nxbe_window_s *wnd, +int nx_constructwindow(NXHANDLE handle, NXWINDOW wnd, FAR const struct nx_callback_s *cb, FAR void *arg) { FAR struct nxfe_state_s *fe = (FAR struct nxfe_state_s *)handle; + FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; FAR struct nxbe_state_s *be = &fe->be; #ifdef CONFIG_DEBUG if (!wnd) { - errno = EINVAL; + set_errno(EINVAL); return ERROR; } @@ -149,4 +150,3 @@ int nx_constructwindow(NXHANDLE handle, FAR struct nxbe_window_s *wnd, return OK; } - diff --git a/graphics/nxsu/nx_openwindow.c b/graphics/nxsu/nx_openwindow.c index 83851d94e2..773210853a 100644 --- a/graphics/nxsu/nx_openwindow.c +++ b/graphics/nxsu/nx_openwindow.c @@ -114,7 +114,7 @@ NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb, /* Then let nx_constructwindow do the rest */ - ret = nx_constructwindow(handle, wnd, cb, arg); + ret = nx_constructwindow(handle, (NXWINDOW)wnd, cb, arg); if (ret < 0) { /* An error occurred, the window has been freed */ @@ -126,4 +126,3 @@ NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb, return (NXWINDOW)wnd; } - diff --git a/graphics/nxsu/nxfe.h b/graphics/nxsu/nxfe.h index 5bbfb040b4..82c1d832be 100644 --- a/graphics/nxsu/nxfe.h +++ b/graphics/nxsu/nxfe.h @@ -59,8 +59,8 @@ /* Server state structure ***************************************************/ -/* This the server 'front-end' state structure. It is really the same - * as the back-end state, but we wrap the back-end state so that we can add +/* This the 'front-end' state structure. It is really the same as the + * the back-end state, but we wrap the back-end state so that we can add * things to the structure in the future */ diff --git a/include/nuttx/nx/nx.h b/include/nuttx/nx/nx.h index 016a30f73c..b8eed92044 100644 --- a/include/nuttx/nx/nx.h +++ b/include/nuttx/nx/nx.h @@ -937,7 +937,7 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect); * * Input Parameters: * handle - The handle returned by nx_connect - * wnd - The pre-allocated window structure. + * hwnd - The pre-allocated window structure. * cb - Callbacks used to process window events * arg - User provided value that will be returned with NX callbacks. * @@ -947,8 +947,7 @@ void nx_redrawreq(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect); * ****************************************************************************/ -struct nxbe_window_s; /* Forward reference */ -int nx_constructwindow(NXHANDLE handle, FAR struct nxbe_window_s *wnd, +int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd, FAR const struct nx_callback_s *cb, FAR void *arg); #undef EXTERN diff --git a/libnx/nxmu/nx_constructwindow.c b/libnx/nxmu/nx_constructwindow.c index 888f5b6082..76e0382029 100644 --- a/libnx/nxmu/nx_constructwindow.c +++ b/libnx/nxmu/nx_constructwindow.c @@ -84,14 +84,14 @@ * inheritance: The caller's window structure may include extensions that * are not visible to NX. * - * NOTE: wnd must have been allocated using kmalloc() (or related allocators) - * Once provided to nx_constructwindow() that memory is owned and managed - * by NX. On certain error conditions or when the window is closed, NX will - * free the window. + * NOTE: hwnd must have been allocated using a user-space allocator that + * permits user access to the window. Once provided to nx_constructwindow() + * that memory is owned and managed by NX. On certain error conditions or + * when the window is closed, NX will free the window. * * Input Parameters: * handle - The handle returned by nx_connect - * wnd - The pre-allocated window structure. + * hwnd - The pre-allocated window structure. * cb - Callbacks used to process window events * arg - User provided value that will be returned with NX callbacks. * @@ -101,10 +101,11 @@ * ****************************************************************************/ -int nx_constructwindow(NXHANDLE handle, FAR struct nxbe_window_s *wnd, +int nx_constructwindow(NXHANDLE handle, NXWINDOW hwnd, FAR const struct nx_callback_s *cb, FAR void *arg) { FAR struct nxfe_conn_s *conn = (FAR struct nxfe_conn_s *)handle; + FAR struct nxbe_window_s *wnd = (FAR struct nxbe_window_s *)hwnd; struct nxsvrmsg_openwindow_s outmsg; #ifdef CONFIG_DEBUG diff --git a/libnx/nxmu/nx_openwindow.c b/libnx/nxmu/nx_openwindow.c index 0f331b9e5c..d09a329ade 100644 --- a/libnx/nxmu/nx_openwindow.c +++ b/libnx/nxmu/nx_openwindow.c @@ -80,7 +80,7 @@ * * Input Parameters: * handle - The handle returned by nx_connect - * cb - Callbacks used to process windo events + * cb - Callbacks used to process window events * arg - User provided value that will be returned with NX callbacks. * * Return: @@ -114,7 +114,7 @@ NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb, /* Then let nx_constructwindow do the rest */ - ret = nx_constructwindow(handle, wnd, cb, arg); + ret = nx_constructwindow(handle, (NXWINDOW)wnd, cb, arg); if (ret < 0) { /* An error occurred, the window has been freed */ diff --git a/libnx/nxtk/nxtk_openwindow.c b/libnx/nxtk/nxtk_openwindow.c index fc7ddd869d..5c94263597 100644 --- a/libnx/nxtk/nxtk_openwindow.c +++ b/libnx/nxtk/nxtk_openwindow.c @@ -146,7 +146,7 @@ NXTKWINDOW nxtk_openwindow(NXHANDLE handle, /* Then let nx_constructwindow do the rest */ - ret = nx_constructwindow(handle, &fwnd->wnd, &g_nxtkcb, NULL); + ret = nx_constructwindow(handle, (NXWINDOW)&fwnd->wnd, &g_nxtkcb, NULL); if (ret < 0) { /* An error occurred, the window has been freed */ @@ -158,4 +158,3 @@ NXTKWINDOW nxtk_openwindow(NXHANDLE handle, return (NXTKWINDOW)fwnd; } - diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 088103f45a..19bdde9fd0 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -30,7 +30,7 @@ "mkdir","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*","mode_t" "mkfifo","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR const char*","mode_t" "mmap","sys/mman.h","CONFIG_NFILE_DESCRIPTORS > 0","FAR void*","FAR void*","size_t","int","int","int","off_t" -"mount","sys/mount.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","const char*","const char*","const char*","unsigned long","const void*" +"mount","sys/mount.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_READABLE)","int","const char*","const char*","const char*","unsigned long","const void*" "mq_close","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t" "mq_notify","mqueue.h","!defined(CONFIG_DISABLE_SIGNALS) && !defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const struct sigevent*" "mq_open","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","mqd_t","const char*","int","..."