فهرست منبع

Merge trunk revision 2404:
r2404 | asalkeld | 2009-09-07 01:33:23 -0700 (Mon, 07 Sep 2009) | 16 lines

Remove a double unlock in logsys.

In logsys there are a number of XYZ_unlocked() functions that are called
like this:

pthread_mutex_lock (&logsys_config_mutex);

XYZ_unlocked();

pthread_mutex_unlock (&logsys_config_mutex);

The XYZ_unlocked() functions should not do any (un)locking.
But _logsys_config_subsys_get_unlocked() unlocks if it finds the subsys.
This means that there is 1 lock and 2 unlocks.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/branches/flatiron@2453 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake 16 سال پیش
والد
کامیت
5625c54d72
1فایلهای تغییر یافته به همراه0 افزوده شده و 1 حذف شده
  1. 0 1
      exec/logsys.c

+ 0 - 1
exec/logsys.c

@@ -824,7 +824,6 @@ static int _logsys_config_subsys_get_unlocked (const char *subsys)
 
  	for (i = 0; i <= LOGSYS_MAX_SUBSYS_COUNT; i++) {
 		if (strcmp (logsys_loggers[i].subsys, subsys) == 0) {
-			pthread_mutex_unlock (&logsys_config_mutex);
 			return i;
 		}
 	}