Parcourir la source

Update to use 64 bit data types for handles.

(Logical change 1.127)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@456 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake il y a 21 ans
Parent
commit
7716482472
2 fichiers modifiés avec 7 ajouts et 7 suppressions
  1. 3 3
      lib/util.c
  2. 4 4
      lib/util.h

+ 3 - 3
lib/util.c

@@ -370,7 +370,7 @@ SaErrorT
 saHandleCreate (
 saHandleCreate (
 	struct saHandleDatabase *handleDatabase,
 	struct saHandleDatabase *handleDatabase,
 	int instanceSize,
 	int instanceSize,
-	unsigned int *handleOut)
+	SaUint64T *handleOut)
 {
 {
 	int handle;
 	int handle;
 	void *newHandles;
 	void *newHandles;
@@ -420,7 +420,7 @@ saHandleCreate (
 SaErrorT
 SaErrorT
 saHandleDestroy (
 saHandleDestroy (
 	struct saHandleDatabase *handleDatabase,
 	struct saHandleDatabase *handleDatabase,
-	unsigned int handle)
+	SaUint64T handle)
 {
 {
 	pthread_mutex_lock (&handleDatabase->mutex);
 	pthread_mutex_lock (&handleDatabase->mutex);
 	handleDatabase->handles[handle].state = SA_HANDLE_STATE_PENDINGREMOVAL;
 	handleDatabase->handles[handle].state = SA_HANDLE_STATE_PENDINGREMOVAL;
@@ -457,7 +457,7 @@ saHandleInstanceGet (
 error_exit:
 error_exit:
 	pthread_mutex_unlock (&handleDatabase->mutex);
 	pthread_mutex_unlock (&handleDatabase->mutex);
 
 
-	return (SA_OK);
+	return (error);
 }
 }
 
 
 
 

+ 4 - 4
lib/util.h

@@ -115,23 +115,23 @@ SaErrorT
 saHandleCreate (
 saHandleCreate (
 	struct saHandleDatabase *handleDatabase,
 	struct saHandleDatabase *handleDatabase,
 	int instanceSize,
 	int instanceSize,
-	unsigned int *handleOut);
+	SaUint64T *handleOut);
 
 
 SaErrorT
 SaErrorT
 saHandleDestroy (
 saHandleDestroy (
 	struct saHandleDatabase *handleDatabase,
 	struct saHandleDatabase *handleDatabase,
-	unsigned int handle);
+	SaUint64T handle);
 
 
 SaErrorT
 SaErrorT
 saHandleInstanceGet (
 saHandleInstanceGet (
 	struct saHandleDatabase *handleDatabase,
 	struct saHandleDatabase *handleDatabase,
-	unsigned int handle,
+	SaUint64T handle,
 	void **instance);
 	void **instance);
 
 
 SaErrorT
 SaErrorT
 saHandleInstancePut (
 saHandleInstancePut (
 	struct saHandleDatabase *handleDatabase,
 	struct saHandleDatabase *handleDatabase,
-	unsigned int handle);
+	SaUint64T handle);
 
 
 SaErrorT
 SaErrorT
 saVersionVerify (
 saVersionVerify (