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:
@ -88,7 +88,7 @@ struct LOCKABLE rwlock {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static inline bool
|
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;
|
return os_rwlock_init(&lock->object) == 0 ? true : false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -204,7 +204,7 @@ struct fd_prestat {
|
|||||||
bool
|
bool
|
||||||
fd_prestats_init(struct fd_prestats *pt)
|
fd_prestats_init(struct fd_prestats *pt)
|
||||||
{
|
{
|
||||||
if (!rwlock_init(&pt->lock))
|
if (!rwlock_initialize(&pt->lock))
|
||||||
return false;
|
return false;
|
||||||
pt->prestats = NULL;
|
pt->prestats = NULL;
|
||||||
pt->size = 0;
|
pt->size = 0;
|
||||||
@ -340,7 +340,7 @@ struct fd_entry {
|
|||||||
bool
|
bool
|
||||||
fd_table_init(struct fd_table *ft)
|
fd_table_init(struct fd_table *ft)
|
||||||
{
|
{
|
||||||
if (!rwlock_init(&ft->lock))
|
if (!rwlock_initialize(&ft->lock))
|
||||||
return false;
|
return false;
|
||||||
ft->entries = NULL;
|
ft->entries = NULL;
|
||||||
ft->size = 0;
|
ft->size = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user