1
0
Fork 0
forked from nuttx/nuttx-update

note: remove NOTERAM_GETTASKNAME

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2023-08-11 10:31:03 +08:00 committed by Xiang Xiao
parent 39001e3705
commit 84799d15ac
3 changed files with 5 additions and 56 deletions

View file

@ -237,15 +237,6 @@ Noteram Device (``/dev/note``)
:return: If success, 0 (``OK``) is returned and the given overwriter mode is set as the current settings.
If failed, a negated ``errno`` is returned.
.. c:macro:: NOTERAM_GETTASKNAME
Get task name string
:argument: A writable pointer to :c:struct:`noteram_get_taskname_s`
:return: If success, 0 (``OK``) is returned and the task name corresponding to given pid is stored into the given pointer.
If failed, a negated ``errno`` is returned.
Filter control APIs
===================

View file

@ -627,30 +627,6 @@ static int noteram_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
#ifdef NOTERAM_GETTASKNAME
/* NOTERAM_GETTASKNAME
* - Get task name string
* Argument: A writable pointer to struct note_get_taskname_s
* Result: If -ESRCH, the corresponding task name doesn't
* exist.
*/
case NOTERAM_GETTASKNAME:
{
FAR struct noteram_get_taskname_s *param;
if (arg == 0)
{
ret = -EINVAL;
break;
}
param = (FAR struct noteram_get_taskname_s *)arg;
ret = note_get_taskname(param->pid, param->taskname);
}
break;
#endif
default:
break;
}
@ -851,15 +827,15 @@ get_task_context(pid_t pid, FAR struct noteram_dump_context_s *ctx)
(*tctxp)->syscall_nest = 0;
(*tctxp)->name[0] = '\0';
#ifdef NOTERAM_GETTASKNAME
#ifdef CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE
{
struct noteram_get_taskname_s tnm;
char taskname[CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE];
int res;
res = note_get_taskname(pid, tnm.taskname);
res = note_get_taskname(pid, taskname);
if (res == 0)
{
copy_task_name((*tctxp)->name, tnm.taskname);
copy_task_name((*tctxp)->name, taskname);
}
}
#endif

View file

@ -46,22 +46,12 @@
* NOTERAM_SETMODE
* - Set overwrite mode
* Argument: A read-only pointer to unsigned int
* NOTERAM_GETTASKNAME
* - Get task name string
* Argument: A writable pointer to struct
* noteram_get_taskname_s
* Result: If -ESRCH, the corresponding task name doesn't
* exist.
*/
#ifdef CONFIG_DRIVERS_NOTERAM
#define NOTERAM_CLEAR _NOTERAMIOC(0x01)
#define NOTERAM_GETMODE _NOTERAMIOC(0x02)
#define NOTERAM_SETMODE _NOTERAMIOC(0x03)
#if defined(CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE) && \
CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE > 0
#define NOTERAM_GETTASKNAME _NOTERAMIOC(0x04)
#endif
#endif
/* Overwrite mode definitions */
@ -76,15 +66,7 @@
* Public Types
****************************************************************************/
/* This is the type of the argument passed to the NOTERAM_GETTASKNAME ioctl */
#ifdef NOTERAM_GETTASKNAME
struct noteram_get_taskname_s
{
pid_t pid;
char taskname[CONFIG_TASK_NAME_SIZE + 1];
};
#endif
struct noteram_driver_s;
/****************************************************************************
* Public Data