File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,17 +45,7 @@ void __newlib_lock_close_recursive(__newlib_recursive_lock_t *lock) {
4545}
4646
4747void __newlib_lock_acquire_recursive (__newlib_recursive_lock_t * lock ) {
48- int old ;
49- int iscur ;
50-
51- // Check to see if we already own it. If so, everything is clear
52- // to incr nest. Otherwise, we can safely go on to do a normal
53- // spinlock wait.
54- old = irq_disable ();
55- iscur = lock -> owner == thd_current ;
56- irq_restore (old );
57-
58- if (iscur ) {
48+ if (lock -> owner == thd_get_current ()) {
5949 lock -> nest ++ ;
6050 return ;
6151 }
@@ -64,7 +54,7 @@ void __newlib_lock_acquire_recursive(__newlib_recursive_lock_t *lock) {
6454 spinlock_lock (& lock -> lock );
6555
6656 // We own it now, so it's safe to init the rest of this.
67- lock -> owner = thd_current ;
57+ lock -> owner = thd_get_current () ;
6858 lock -> nest = 1 ;
6959}
7060
You can’t perform that action at this time.
0 commit comments