aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-23 17:53:58 +0000
committerChristian Grothoff <christian@grothoff.org>2015-06-23 17:53:58 +0000
commite6cc8b86efac6c64d46604baabcd41f5af8c9ff3 (patch)
treebc02c2034275f2389af954439b12bc6efc707ba2
parent69bf12b84054dcbde84fb07eaa9bb9e5d60f1355 (diff)
downloadgnunet-e6cc8b86efac6c64d46604baabcd41f5af8c9ff3.tar.gz
gnunet-e6cc8b86efac6c64d46604baabcd41f5af8c9ff3.zip
fix #3862
-rw-r--r--configure.ac1
-rw-r--r--src/include/gnunet_common.h71
-rw-r--r--src/include/gnunet_crypto_lib.h5
-rw-r--r--src/include/gnunet_scheduler_lib.h67
4 files changed, 72 insertions, 72 deletions
diff --git a/configure.ac b/configure.ac
index f94ee999f..a30a540ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -380,6 +380,7 @@ then
380 bluetooth=1 380 bluetooth=1
381fi 381fi
382 382
383
383# check for libpulse(audio) library 384# check for libpulse(audio) library
384pulse=0 385pulse=0
385AC_CHECK_LIB(pulse,pa_stream_peek, 386AC_CHECK_LIB(pulse,pa_stream_peek,
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index cd75cc3bd..4e882c113 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -1133,6 +1133,77 @@ GNUNET_copy_message (const struct GNUNET_MessageHeader *msg);
1133#endif 1133#endif
1134 1134
1135 1135
1136/**
1137 * Valid task priorities. Use these, do not pass random integers!
1138 * For various reasons (#3862 -- building with QT Creator, and
1139 * our restricted cross-compilation with emscripten) this cannot
1140 * be in gnunet_scheduler_lib.h, but it works if we declare it here.
1141 * Naturally, logically this is part of the scheduler.
1142 */
1143enum GNUNET_SCHEDULER_Priority
1144{
1145 /**
1146 * Run with the same priority as the current job.
1147 */
1148 GNUNET_SCHEDULER_PRIORITY_KEEP = 0,
1149
1150 /**
1151 * Run when otherwise idle.
1152 */
1153 GNUNET_SCHEDULER_PRIORITY_IDLE = 1,
1154
1155 /**
1156 * Run as background job (higher than idle,
1157 * lower than default).
1158 */
1159 GNUNET_SCHEDULER_PRIORITY_BACKGROUND = 2,
1160
1161 /**
1162 * Run with the default priority (normal
1163 * P2P operations). Any task that is scheduled
1164 * without an explicit priority being specified
1165 * will run with this priority.
1166 */
1167 GNUNET_SCHEDULER_PRIORITY_DEFAULT = 3,
1168
1169 /**
1170 * Run with high priority (important requests).
1171 * Higher than DEFAULT.
1172 */
1173 GNUNET_SCHEDULER_PRIORITY_HIGH = 4,
1174
1175 /**
1176 * Run with priority for interactive tasks.
1177 * Higher than "HIGH".
1178 */
1179 GNUNET_SCHEDULER_PRIORITY_UI = 5,
1180
1181 /**
1182 * Run with priority for urgent tasks. Use
1183 * for things like aborts and shutdowns that
1184 * need to preempt "UI"-level tasks.
1185 * Higher than "UI".
1186 */
1187 GNUNET_SCHEDULER_PRIORITY_URGENT = 6,
1188
1189 /**
1190 * This is an internal priority level that is only used for tasks
1191 * that are being triggered due to shutdown (they have automatically
1192 * highest priority). User code must not use this priority level
1193 * directly. Tasks run with this priority level that internally
1194 * schedule other tasks will see their original priority level
1195 * be inherited (unless otherwise specified).
1196 */
1197 GNUNET_SCHEDULER_PRIORITY_SHUTDOWN = 7,
1198
1199 /**
1200 * Number of priorities (must be the last priority).
1201 * This priority must not be used by clients.
1202 */
1203 GNUNET_SCHEDULER_PRIORITY_COUNT = 8
1204};
1205
1206
1136#if 0 /* keep Emacsens' auto-indent happy */ 1207#if 0 /* keep Emacsens' auto-indent happy */
1137{ 1208{
1138#endif 1209#endif
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index 93206cfc3..7439932c9 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -56,11 +56,6 @@ struct GNUNET_PeerIdentity;
56#include "gnunet_common.h" 56#include "gnunet_common.h"
57#include <gcrypt.h> 57#include <gcrypt.h>
58 58
59/**
60 * We need this enum here, but not the entire scheduler API.
61 * For the full definition, see gnunet_scheduler_lib.h.
62 */
63enum GNUNET_SCHEDULER_Priority;
64 59
65/** 60/**
66 * @brief A 512-bit hashcode 61 * @brief A 512-bit hashcode
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index 94e13f9b2..7c9ff1553 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -87,73 +87,6 @@ enum GNUNET_SCHEDULER_Reason
87}; 87};
88 88
89 89
90/**
91 * Valid task priorities. Use these, do not
92 * pass random integers!
93 */
94enum GNUNET_SCHEDULER_Priority
95{
96 /**
97 * Run with the same priority as the current job.
98 */
99 GNUNET_SCHEDULER_PRIORITY_KEEP = 0,
100
101 /**
102 * Run when otherwise idle.
103 */
104 GNUNET_SCHEDULER_PRIORITY_IDLE = 1,
105
106 /**
107 * Run as background job (higher than idle,
108 * lower than default).
109 */
110 GNUNET_SCHEDULER_PRIORITY_BACKGROUND = 2,
111
112 /**
113 * Run with the default priority (normal
114 * P2P operations). Any task that is scheduled
115 * without an explicit priority being specified
116 * will run with this priority.
117 */
118 GNUNET_SCHEDULER_PRIORITY_DEFAULT = 3,
119
120 /**
121 * Run with high priority (important requests).
122 * Higher than DEFAULT.
123 */
124 GNUNET_SCHEDULER_PRIORITY_HIGH = 4,
125
126 /**
127 * Run with priority for interactive tasks.
128 * Higher than "HIGH".
129 */
130 GNUNET_SCHEDULER_PRIORITY_UI = 5,
131
132 /**
133 * Run with priority for urgent tasks. Use
134 * for things like aborts and shutdowns that
135 * need to preempt "UI"-level tasks.
136 * Higher than "UI".
137 */
138 GNUNET_SCHEDULER_PRIORITY_URGENT = 6,
139
140 /**
141 * This is an internal priority level that is only used for tasks
142 * that are being triggered due to shutdown (they have automatically
143 * highest priority). User code must not use this priority level
144 * directly. Tasks run with this priority level that internally
145 * schedule other tasks will see their original priority level
146 * be inherited (unless otherwise specified).
147 */
148 GNUNET_SCHEDULER_PRIORITY_SHUTDOWN = 7,
149
150 /**
151 * Number of priorities (must be the last priority).
152 * This priority must not be used by clients.
153 */
154 GNUNET_SCHEDULER_PRIORITY_COUNT = 8
155};
156
157#include "gnunet_time_lib.h" 90#include "gnunet_time_lib.h"
158#include "gnunet_network_lib.h" 91#include "gnunet_network_lib.h"
159 92