aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-16 14:49:41 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-05-16 14:49:41 +0000
commit53f1b747726d85020beca994f6fe67a5e9af7b8e (patch)
tree72bbc0235de15168314bc3b5c803464f2c16f667 /test
parentb20088a8cb72e3f3e694e309671cd7f96fb552dc (diff)
downloadChibiOS-53f1b747726d85020beca994f6fe67a5e9af7b8e.tar.gz
ChibiOS-53f1b747726d85020beca994f6fe67a5e9af7b8e.tar.bz2
ChibiOS-53f1b747726d85020beca994f6fe67a5e9af7b8e.zip
Added static initializers for mailboxes and memory pools.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@978 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r--test/testmbox.c10
-rw-r--r--test/testpools.c2
-rw-r--r--test/testqueues.c4
3 files changed, 10 insertions, 6 deletions
diff --git a/test/testmbox.c b/test/testmbox.c
index 2403afce6..a485c3a4e 100644
--- a/test/testmbox.c
+++ b/test/testmbox.c
@@ -55,8 +55,12 @@
#define ALLOWED_DELAY MS2ST(5)
#define MB_SIZE 5
-static msg_t mb1_buf[MB_SIZE];
-static Mailbox mb1;
+/*
+ * Note, the static initializers are not really required because the
+ * variables are explicitly initialized in each test case. It is done in order
+ * to test the macros.
+ */
+static MAILBOX_DECL(mb1, waT0, MB_SIZE);
/**
* @page test_mbox_001 Queuing and timeouts
@@ -74,7 +78,7 @@ static char *mbox1_gettest(void) {
static void mbox1_setup(void) {
- chMBInit(&mb1, mb1_buf, MB_SIZE);
+ chMBInit(&mb1, (msg_t *)waT0, MB_SIZE);
}
static void mbox1_execute(void) {
diff --git a/test/testpools.c b/test/testpools.c
index 78f19a91c..ce6716444 100644
--- a/test/testpools.c
+++ b/test/testpools.c
@@ -49,7 +49,7 @@
#if CH_USE_MEMPOOLS
-static MemoryPool mp1;
+static MEMORYPOOL_DECL(mp1, THD_WA_SIZE(THREADS_STACK_SIZE));
/**
* @page test_pools_001 Allocation and enqueuing test
diff --git a/test/testqueues.c b/test/testqueues.c
index 36c90402b..fe79712eb 100644
--- a/test/testqueues.c
+++ b/test/testqueues.c
@@ -64,8 +64,8 @@ static void notify(void) {}
* variables are explicitly initialized in each test case. It is done in order
* to test the macros.
*/
-static INPUTQUEUE_DECL(iq, (uint8_t *)waT0, TEST_QUEUES_SIZE, notify);
-static OUTPUTQUEUE_DECL(oq, (uint8_t *)waT0, TEST_QUEUES_SIZE, notify);
+static INPUTQUEUE_DECL(iq, waT0, TEST_QUEUES_SIZE, notify);
+static OUTPUTQUEUE_DECL(oq, waT0, TEST_QUEUES_SIZE, notify);
/**
* @page test_queues_001 Input Queues functionality and APIs
244'>244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379