Add const to string parameters in WelsThreadLib

This commit is contained in:
Martin Storsjö 2014-03-02 01:22:08 +02:00
parent d767e216a8
commit 8db97925a5
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);