mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-11 20:21:11 +00:00
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:
parent
884c1abc11
commit
915adc433d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user