[Mesa-dev] [PATCH 10/13] hash: Add _mesa_HashRemoveLocked() function.

Matt Turner mattst88 at gmail.com
Fri Aug 7 10:32:04 PDT 2015


On Fri, Aug 7, 2015 at 1:57 AM, Timothy Arceri <t_arceri at yahoo.com.au> wrote:
> On Thu, 2015-08-06 at 17:11 -0700, Matt Turner wrote:
>> ---
>>  src/mesa/main/hash.c | 19 +++++++++++++++----
>>  src/mesa/main/hash.h |  2 ++
>>  2 files changed, 17 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
>> index 315b5d6..aa1c6a1 100644
>> --- a/src/mesa/main/hash.c
>> +++ b/src/mesa/main/hash.c
>> @@ -328,8 +328,8 @@ _mesa_HashInsert(struct _mesa_HashTable *table, GLuint
>> key, void *data)
>>   * While holding the hash table's lock, searches the entry with the
>> matching
>>   * key and unlinks it.
>>   */
>> -void
>> -_mesa_HashRemove(struct _mesa_HashTable *table, GLuint key)
>> +static inline void
>> +_mesa_HashRemove_unlocked(struct _mesa_HashTable *table, GLuint key)
>
> Any reason why this isnt just _mesa_HashRemoveUnlocked to match the naming of
> locked?

Yes -- it's static. Also because the convention is <function-name>
will perform locking and <function-name>Locked will not.


More information about the mesa-dev mailing list