lkml.org 
[lkml]   [2019]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] drivers/staging/exfat: Replace binary semaphores for mutexes
Date
On Wed, 30 Oct 2019 07:49:16 -0700, Davidlohr Bueso said:
> At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal
> than semaphores; it's also a nicer interface for mutual exclusion,
> which is why they are encouraged over binary semaphores, when possible.
>
> For both v_sem and z_sem, their semantics imply traditional lock
> ownership; that is, the lock owner is the same for both lock/unlock
> operations. Therefore it is safe to convert.
>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>

Looks sane.

Acked-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>


\
 
 \ /
  Last update: 2019-10-30 16:42    [W:0.035 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site