mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +08:00
drivers/net/phy_notify.c and all network drivers that support PHY notifications: Support the signal notification through SIGEV_THREAD
This commit is contained in:
+3
-3
@@ -40,6 +40,7 @@
|
||||
* Included Files
|
||||
*******************************************************************************************/
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
/*******************************************************************************************
|
||||
@@ -119,9 +120,8 @@
|
||||
|
||||
struct mii_iotcl_notify_s
|
||||
{
|
||||
pid_t pid; /* PID of the task to receive the signal. Zero means "this task" */
|
||||
uint8_t signo; /* Signal number to use when signalling */
|
||||
FAR void *arg; /* An argument that will accompany the signal callback */
|
||||
pid_t pid; /* PID of the task to receive the signal. Zero means "this task" */
|
||||
struct sigevent event; /* Describe the way a task is to be notified */
|
||||
};
|
||||
|
||||
/* Structure passed to read from or write to the MII/PHY management interface via the
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/****************************************************************************
|
||||
@@ -103,8 +104,7 @@ extern "C"
|
||||
* terminator). Configurable with CONFIG_PHY_NOTIFICATION_MAXINTFLEN.
|
||||
* pid - Identifies the task to receive the signal. The special value
|
||||
* of zero means to use the pid of the current task.
|
||||
* signo - This is the signal number to use when notifying the task.
|
||||
* arg - An argument that will accompany the notification signal.
|
||||
* event - Describe the way a task is to be notified
|
||||
*
|
||||
* Returned Value:
|
||||
* OK on success; Negated errno on failure.
|
||||
@@ -112,8 +112,8 @@ extern "C"
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_ARCH_PHY_INTERRUPT
|
||||
int phy_notify_subscribe(FAR const char *intf, pid_t pid, int signo,
|
||||
FAR void *arg);
|
||||
int phy_notify_subscribe(FAR const char *intf, pid_t pid,
|
||||
FAR struct sigevent *event);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user