Просмотр исходного кода

queue.h: Replace #ifdef COROSYNC_SOLARIS...

* include/corosync/queue.h: Remove #ifdef COROSYNC_SOLARIS
in favor of agnostic "#ifdef queue".

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2010 fd59a12c-fef9-0310-b244-a6a79926bd2f
Jim Meyering 17 лет назад
Родитель
Сommit
2331454b2b
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      include/corosync/queue.h

+ 5 - 4
include/corosync/queue.h

@@ -6,7 +6,7 @@
  * Author: Steven Dake (sdake@redhat.com)
  *
  * This software licensed under BSD license, the text of which follows:
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
  *
@@ -38,8 +38,9 @@
 #include <pthread.h>
 #include "assert.h"
 
-#ifdef COROSYNC_SOLARIS
+#ifdef queue
 /* struct queue is already defined in sys/stream.h on Solaris */
+#undef queue
 #define	queue _queue
 #endif
 struct queue {
@@ -144,7 +145,7 @@ static inline void *queue_item_get (struct queue *queue)
 static inline void queue_item_remove (struct queue *queue) {
 	pthread_mutex_lock (&queue->mutex);
 	queue->tail = (queue->tail + 1) % queue->size;
-	
+
 	assert (queue->tail != queue->head);
 
 	queue->used--;
@@ -156,7 +157,7 @@ static inline void queue_items_remove (struct queue *queue, int rel_count)
 {
 	pthread_mutex_lock (&queue->mutex);
 	queue->tail = (queue->tail + rel_count) % queue->size;
-	
+
 	assert (queue->tail != queue->head);
 
 	queue->used -= rel_count;