mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 13:18:50 +08:00
net_ioballoc: remove redundant critical section
This commit is contained in:
parent
b5bb0d56ad
commit
0272a16010
1 changed files with 0 additions and 4 deletions
|
@ -499,7 +499,6 @@ FAR struct iob_s *net_ioballoc(bool throttled, enum iob_user_e consumerid)
|
|||
iob = iob_tryalloc(throttled, consumerid);
|
||||
if (iob == NULL)
|
||||
{
|
||||
irqstate_t flags;
|
||||
unsigned int count;
|
||||
int blresult;
|
||||
|
||||
|
@ -507,15 +506,12 @@ FAR struct iob_s *net_ioballoc(bool throttled, enum iob_user_e consumerid)
|
|||
* become available. But let's not do that with the network locked.
|
||||
*/
|
||||
|
||||
flags = enter_critical_section();
|
||||
blresult = net_breaklock(&count);
|
||||
iob = iob_alloc(throttled, consumerid);
|
||||
if (blresult >= 0)
|
||||
{
|
||||
net_restorelock(count);
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
return iob;
|
||||
|
|
Loading…
Reference in a new issue