2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2012 (c), Joyent, Inc. All rights reserved.
20 " \"sizes\": [ \"first\", 2, %f ]," \
26 " \"action\": \"%s\"" \
30 waiting(volatile int *a
)
36 main(int argc
, char **argv
)
42 while (waiting(&a
) == 0)
45 for (idx
= 0; idx
< 10; idx
++) {
46 char *odd
, *even
, *json
, *action
;
49 odd
= idx
% 2 == 1 ? "true" : "false";
50 even
= idx
% 2 == 0 ? "true" : "false";
51 action
= idx
== 7 ? "ignore" : "print";
53 asprintf(&json
, FMT
, size
, idx
, odd
, even
, action
);
54 BUNYAN_FAKE_LOG_DEBUG(json
);
58 BUNYAN_FAKE_LOG_DEBUG("{\"finished\": true}");