Add const to string parameters in WelsThreadLib
This commit is contained in:
parent
d767e216a8
commit
8db97925a5
@ -268,7 +268,7 @@ WELS_THREAD_ERROR_CODE WelsEventDestroy (WELS_EVENT* event) {
|
||||
return sem_destroy (event); // match with sem_init
|
||||
}
|
||||
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, char* event_name) {
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, const char* event_name) {
|
||||
if (p_event == NULL || event_name == NULL)
|
||||
return WELS_THREAD_ERROR_GENERAL;
|
||||
*p_event = sem_open (event_name, O_CREAT, (S_IRUSR | S_IWUSR)/*0600*/, 0);
|
||||
@ -280,7 +280,7 @@ WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, char* event_name)
|
||||
return WELS_THREAD_ERROR_OK;
|
||||
}
|
||||
}
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, char* event_name) {
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name) {
|
||||
WELS_THREAD_ERROR_CODE err = sem_close (event); // match with sem_open
|
||||
if (event_name)
|
||||
sem_unlink (event_name);
|
||||
|
@ -110,8 +110,8 @@ WELS_THREAD_ERROR_CODE WelsMutexUnlock (WELS_MUTEX* mutex);
|
||||
WELS_THREAD_ERROR_CODE WelsMutexDestroy (WELS_MUTEX* mutex);
|
||||
|
||||
#ifdef __GNUC__
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, char* event_name);
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, char* event_name);
|
||||
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT** p_event, const char* event_name);
|
||||
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name);
|
||||
#endif//__GNUC__
|
||||
WELS_THREAD_ERROR_CODE WelsEventInit (WELS_EVENT* event);
|
||||
WELS_THREAD_ERROR_CODE WelsEventDestroy (WELS_EVENT* event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user