mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 12:57:57 +08:00
sched/spin_lock: rename raw_spin_lock to spin_lock_notrace
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
@@ -72,9 +72,9 @@ static FAR struct file *files_fget_by_index(FAR struct filelist *list,
|
||||
FAR struct file *filep;
|
||||
irqstate_t flags;
|
||||
|
||||
flags = raw_spin_lock_irqsave(&list->fl_lock);
|
||||
flags = spin_lock_irqsave_notrace(&list->fl_lock);
|
||||
filep = &list->fl_files[l1][l2];
|
||||
raw_spin_unlock_irqrestore(&list->fl_lock, flags);
|
||||
spin_unlock_irqrestore_notrace(&list->fl_lock, flags);
|
||||
|
||||
#ifdef CONFIG_FS_REFCOUNT
|
||||
if (filep->f_inode != NULL)
|
||||
@@ -164,7 +164,7 @@ static int files_extend(FAR struct filelist *list, size_t row)
|
||||
}
|
||||
while (++i < row);
|
||||
|
||||
flags = raw_spin_lock_irqsave(&list->fl_lock);
|
||||
flags = spin_lock_irqsave_notrace(&list->fl_lock);
|
||||
|
||||
/* To avoid race condition, if the file list is updated by other threads
|
||||
* and list rows is greater or equal than temp list,
|
||||
@@ -173,7 +173,7 @@ static int files_extend(FAR struct filelist *list, size_t row)
|
||||
|
||||
if (orig_rows != list->fl_rows && list->fl_rows >= row)
|
||||
{
|
||||
raw_spin_unlock_irqrestore(&list->fl_lock, flags);
|
||||
spin_unlock_irqrestore_notrace(&list->fl_lock, flags);
|
||||
|
||||
for (j = orig_rows; j < i; j++)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ static int files_extend(FAR struct filelist *list, size_t row)
|
||||
list->fl_files = files;
|
||||
list->fl_rows = row;
|
||||
|
||||
raw_spin_unlock_irqrestore(&list->fl_lock, flags);
|
||||
spin_unlock_irqrestore_notrace(&list->fl_lock, flags);
|
||||
|
||||
if (tmp != NULL && tmp != &list->fl_prefile)
|
||||
{
|
||||
@@ -565,13 +565,13 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode,
|
||||
|
||||
/* Find free file */
|
||||
|
||||
flags = raw_spin_lock_irqsave(&list->fl_lock);
|
||||
flags = spin_lock_irqsave_notrace(&list->fl_lock);
|
||||
|
||||
for (; ; i++, j = 0)
|
||||
{
|
||||
if (i >= list->fl_rows)
|
||||
{
|
||||
raw_spin_unlock_irqrestore(&list->fl_lock, flags);
|
||||
spin_unlock_irqrestore_notrace(&list->fl_lock, flags);
|
||||
|
||||
ret = files_extend(list, i + 1);
|
||||
if (ret < 0)
|
||||
@@ -579,7 +579,7 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode,
|
||||
return ret;
|
||||
}
|
||||
|
||||
flags = raw_spin_lock_irqsave(&list->fl_lock);
|
||||
flags = spin_lock_irqsave_notrace(&list->fl_lock);
|
||||
}
|
||||
|
||||
do
|
||||
@@ -608,7 +608,7 @@ int file_allocate_from_tcb(FAR struct tcb_s *tcb, FAR struct inode *inode,
|
||||
}
|
||||
|
||||
found:
|
||||
raw_spin_unlock_irqrestore(&list->fl_lock, flags);
|
||||
spin_unlock_irqrestore_notrace(&list->fl_lock, flags);
|
||||
|
||||
if (addref)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user