Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trace: replace all *_wo_note to *_notrace to make api define more approachable #14943

Closed
wants to merge 1 commit into from
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
16 changes: 8 additions & 8 deletions drivers/note/note_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ void sched_note_filter_mode(FAR struct note_filter_named_mode_s *oldm,
irqstate_t irq_mask;
FAR struct note_driver_s **driver;

irq_mask = spin_lock_irqsave_wo_note(&g_note_lock);
irq_mask = spin_lock_irqsave_notrace(&g_note_lock);
anchao marked this conversation as resolved.
Show resolved Hide resolved

if (oldm != NULL)
{
Expand Down Expand Up @@ -1873,7 +1873,7 @@ void sched_note_filter_mode(FAR struct note_filter_named_mode_s *oldm,
}
}

spin_unlock_irqrestore_wo_note(&g_note_lock, irq_mask);
spin_unlock_irqrestore_notrace(&g_note_lock, irq_mask);
}

/****************************************************************************
Expand Down Expand Up @@ -1903,7 +1903,7 @@ void sched_note_filter_syscall(FAR struct note_filter_named_syscall_s *oldf,
irqstate_t irq_mask;
FAR struct note_driver_s **driver;

irq_mask = spin_lock_irqsave_wo_note(&g_note_lock);
irq_mask = spin_lock_irqsave_notrace(&g_note_lock);

if (oldf != NULL)
{
Expand Down Expand Up @@ -1939,7 +1939,7 @@ void sched_note_filter_syscall(FAR struct note_filter_named_syscall_s *oldf,
}
}

spin_unlock_irqrestore_wo_note(&g_note_lock, irq_mask);
spin_unlock_irqrestore_notrace(&g_note_lock, irq_mask);
}
#endif

Expand Down Expand Up @@ -1970,7 +1970,7 @@ void sched_note_filter_irq(FAR struct note_filter_named_irq_s *oldf,
irqstate_t irq_mask;
FAR struct note_driver_s **driver;

irq_mask = spin_lock_irqsave_wo_note(&g_note_lock);
irq_mask = spin_lock_irqsave_notrace(&g_note_lock);

if (oldf != NULL)
{
Expand Down Expand Up @@ -2006,7 +2006,7 @@ void sched_note_filter_irq(FAR struct note_filter_named_irq_s *oldf,
}
}

spin_unlock_irqrestore_wo_note(&g_note_lock, irq_mask);
spin_unlock_irqrestore_notrace(&g_note_lock, irq_mask);
}
#endif

Expand Down Expand Up @@ -2037,7 +2037,7 @@ void sched_note_filter_tag(FAR struct note_filter_named_tag_s *oldf,
irqstate_t falgs;
FAR struct note_driver_s **driver;

falgs = spin_lock_irqsave_wo_note(&g_note_lock);
falgs = spin_lock_irqsave_notrace(&g_note_lock);

if (oldf != NULL)
{
Expand Down Expand Up @@ -2073,7 +2073,7 @@ void sched_note_filter_tag(FAR struct note_filter_named_tag_s *oldf,
}
}

spin_unlock_irqrestore_wo_note(&g_note_lock, falgs);
spin_unlock_irqrestore_notrace(&g_note_lock, falgs);
}
#endif

Expand Down
26 changes: 13 additions & 13 deletions drivers/note/noteram_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ static ssize_t noteram_read(FAR struct file *filep, FAR char *buffer,

if (ctx->mode == NOTERAM_MODE_READ_BINARY)
{
flags = spin_lock_irqsave_wo_note(&drv->lock);
flags = spin_lock_irqsave_notrace(&drv->lock);
ret = noteram_get(drv, (FAR uint8_t *)buffer, buflen);
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
}
else
{
Expand All @@ -481,9 +481,9 @@ static ssize_t noteram_read(FAR struct file *filep, FAR char *buffer,

/* Get the next note (removing it from the buffer) */

flags = spin_lock_irqsave_wo_note(&drv->lock);
flags = spin_lock_irqsave_notrace(&drv->lock);
ret = noteram_get(drv, note, sizeof(note));
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
if (ret <= 0)
{
return ret;
Expand All @@ -508,7 +508,7 @@ static int noteram_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
{
int ret = -ENOSYS;
FAR struct noteram_driver_s *drv = filep->f_inode->i_private;
irqstate_t flags = spin_lock_irqsave_wo_note(&drv->lock);
irqstate_t flags = spin_lock_irqsave_notrace(&drv->lock);

/* Handle the ioctl commands */

Expand Down Expand Up @@ -600,7 +600,7 @@ static int noteram_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
break;
}

spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
return ret;
}

Expand All @@ -622,7 +622,7 @@ static int noteram_poll(FAR struct file *filep, FAR struct pollfd *fds,
DEBUGASSERT(inode != NULL && inode->i_private != NULL);
drv = inode->i_private;

flags = spin_lock_irqsave_wo_note(&drv->lock);
flags = spin_lock_irqsave_notrace(&drv->lock);

/* Ignore waits that do not include POLLIN */

Expand Down Expand Up @@ -655,7 +655,7 @@ static int noteram_poll(FAR struct file *filep, FAR struct pollfd *fds,

if (noteram_unread_length(drv) > 0)
{
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
poll_notify(&drv->pfd, 1, POLLIN);
return ret;
}
Expand All @@ -666,7 +666,7 @@ static int noteram_poll(FAR struct file *filep, FAR struct pollfd *fds,
}

errout:
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
return ret;
}

Expand Down Expand Up @@ -698,11 +698,11 @@ static void noteram_add(FAR struct note_driver_s *driver,
unsigned int space;
irqstate_t flags;

flags = spin_lock_irqsave_wo_note(&drv->lock);
flags = spin_lock_irqsave_notrace(&drv->lock);

if (drv->ni_overwrite == NOTERAM_MODE_OVERWRITE_OVERFLOW)
{
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
return;
}

Expand All @@ -716,7 +716,7 @@ static void noteram_add(FAR struct note_driver_s *driver,
/* Stop recording if not in overwrite mode */

drv->ni_overwrite = NOTERAM_MODE_OVERWRITE_OVERFLOW;
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
return;
}

Expand All @@ -737,7 +737,7 @@ static void noteram_add(FAR struct note_driver_s *driver,
memcpy(drv->ni_buffer + head, note, space);
memcpy(drv->ni_buffer, buf + space, notelen - space);
drv->ni_head = noteram_next(drv, head, NOTE_ALIGN(notelen));
spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
poll_notify(&drv->pfd, 1, POLLIN);
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/note/noterpmsg_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ static bool noterpmsg_transfer(FAR struct noterpmsg_driver_s *drv,
static void noterpmsg_work(FAR void *priv)
{
FAR struct noterpmsg_driver_s *drv = priv;
irqstate_t flags = spin_lock_irqsave_wo_note(&drv->lock);
irqstate_t flags = spin_lock_irqsave_notrace(&drv->lock);

if (!noterpmsg_transfer(drv, false))
{
work_queue(HPWORK, &drv->work, noterpmsg_work, drv,
NOTE_RPMSG_WORK_DELAY);
}

spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
}

static void noterpmsg_add(FAR struct note_driver_s *driver,
Expand All @@ -199,7 +199,7 @@ static void noterpmsg_add(FAR struct note_driver_s *driver,
irqstate_t flags;
size_t space;

flags = spin_lock_irqsave_wo_note(&drv->lock);
flags = spin_lock_irqsave_notrace(&drv->lock);

space = CONFIG_DRIVERS_NOTERPMSG_BUFSIZE - noterpmsg_length(drv);
if (space < notelen)
Expand Down Expand Up @@ -236,7 +236,7 @@ static void noterpmsg_add(FAR struct note_driver_s *driver,
NOTE_RPMSG_WORK_DELAY);
}

spin_unlock_irqrestore_wo_note(&drv->lock, flags);
spin_unlock_irqrestore_notrace(&drv->lock, flags);
}

static int noterpmsg_ept_cb(FAR struct rpmsg_endpoint *ept,
Expand Down
2 changes: 1 addition & 1 deletion include/nuttx/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
do \
{ \
g_cpu_irqset = 0; \
spin_unlock_wo_note(&g_cpu_irqlock); \
spin_unlock_notrace(&g_cpu_irqlock); \
} \
while (0)
#endif
Expand Down
Loading
Loading