Skip to content

Commit

Permalink
Rename rwlock_init to avoid conflict (#3016)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
no1wudi committed Jan 16, 2024
1 parent 884c1ab commit 915adc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 915adc4

Please sign in to comment.