mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
Squashed commit of the following:
sched/semaphore: Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable. Changed all references to sem_post in the OS to nxsem_post().
sched/semaphore: Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable. Changed all references to sem_destroy() in the OS to nxsem_destroy().
libc/semaphore and sched/semaphore: Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable. Changed all references to sem_setprotocol in the OS to nxsem_setprotocol(). sem_getprotocol() was not used in the OS
This commit is contained in:
+2
-2
@@ -1958,7 +1958,7 @@ static int fat_bind(FAR struct inode *blkdriver, FAR const void *data,
|
||||
ret = fat_mount(fs, true);
|
||||
if (ret != 0)
|
||||
{
|
||||
sem_destroy(&fs->fs_sem);
|
||||
nxsem_destroy(&fs->fs_sem);
|
||||
kmm_free(fs);
|
||||
return ret;
|
||||
}
|
||||
@@ -2055,7 +2055,7 @@ static int fat_unbind(FAR void *handle, FAR struct inode **blkdriver,
|
||||
fat_io_free(fs->fs_buffer, fs->fs_hwsectorsize);
|
||||
}
|
||||
|
||||
sem_destroy(&fs->fs_sem);
|
||||
nxsem_destroy(&fs->fs_sem);
|
||||
kmm_free(fs);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -374,7 +374,7 @@ void fat_semtake(struct fat_mountpt_s *fs)
|
||||
|
||||
void fat_semgive(struct fat_mountpt_s *fs)
|
||||
{
|
||||
sem_post(&fs->fs_sem);
|
||||
nxsem_post(&fs->fs_sem);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user