mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Add task name recording for note RAM driver
This commit is contained in:
committed by
Xiang Xiao
parent
cc869d891c
commit
7905ee17d4
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/fs/ioctl.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
@@ -43,12 +44,21 @@
|
||||
* 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_DRIVER_NOTERAM
|
||||
#define NOTERAM_CLEAR _NOTERAMIOC(0x01)
|
||||
#define NOTERAM_GETMODE _NOTERAMIOC(0x02)
|
||||
#define NOTERAM_SETMODE _NOTERAMIOC(0x03)
|
||||
#if CONFIG_DRIVER_NOTERAM_TASKNAME_BUFSIZE > 0
|
||||
#define NOTERAM_GETTASKNAME _NOTERAMIOC(0x04)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Overwrite mode definitions */
|
||||
@@ -59,6 +69,20 @@
|
||||
#define NOTERAM_MODE_OVERWRITE_OVERFLOW 2
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* This is the type of the argument passed to the NOTERAM_GETTASKNAME ioctl */
|
||||
|
||||
#if CONFIG_DRIVER_NOTERAM_TASKNAME_BUFSIZE > 0
|
||||
struct noteram_get_taskname_s
|
||||
{
|
||||
pid_t pid;
|
||||
char taskname[CONFIG_TASK_NAME_SIZE + 1];
|
||||
};
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user