Rename rwlock_init to avoid conflict (#3016)

This symbol is too simple to cause conflict with others, such as the RW
spinlock in Linux kernel and NuttX, so rename it to avoid the conflict.
This commit is contained in:
Huang Qi 2024-01-16 08:53:18 +08:00 committed by GitHub
parent 884c1abc11
commit 915adc433d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ struct LOCKABLE rwlock {
};
static inline bool
rwlock_init(struct rwlock *lock) REQUIRES_UNLOCKED(*lock)
rwlock_initialize(struct rwlock *lock) REQUIRES_UNLOCKED(*lock)
{
return os_rwlock_init(&lock->object) == 0 ? true : false;
}

View File

@ -204,7 +204,7 @@ struct fd_prestat {
bool
fd_prestats_init(struct fd_prestats *pt)
{
if (!rwlock_init(&pt->lock))
if (!rwlock_initialize(&pt->lock))
return false;
pt->prestats = NULL;
pt->size = 0;
@ -340,7 +340,7 @@ struct fd_entry {
bool
fd_table_init(struct fd_table *ft)
{
if (!rwlock_init(&ft->lock))
if (!rwlock_initialize(&ft->lock))
return false;
ft->entries = NULL;
ft->size = 0;