: "+a" (a3_ret1), "+d" (a2_ret2), "+r" (a6)
: "r" (a0), "r" (a1), "r" (a4), [arg5] "m" (arg5));
- return (struct sysret){.error = a3_ret1, .value = a2_ret2};
+ return (struct sysret){/*error*/ a3_ret1, /*value*/ a2_ret2};
}
#define syscall7(_a, _b, _c, _d, _e, _f, _g) \
{
BF_SYSCALL_BODY(num, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9,
arg10, arg11, arg12, "");
- return (struct sysret){.error = a10_ret1, .value = a2_ret2};
+ return (struct sysret){/*error*/ a10_ret1, /*value*/ a2_ret2};
}
#define syscall12(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l) \
uint8_t guard_size; ///< Guard size of the CNode
} __attribute__((packed));
-#define NULL_CNODE (struct cnoderef){ .address = 0, .address_bits = 0, \
- .size_bits = 0, .guard_size = 0 }
+#define NULL_CNODE (struct cnoderef){ /*address*/ 0, /*address_bits*/ 0, \
+ /*size_bits*/ 0, /*guard_size*/ 0 }
/**
* \brief User-level representation of a capability and its CSpace address
capaddr_t slot; ///< Slot number within CNode
};
-#define NULL_CAP (struct capref){ .cnode = NULL_CNODE, .slot = 0 }
+#define NULL_CAP (struct capref){ /*cnode*/ NULL_CNODE, /*slot*/ 0 }
static inline bool capref_is_null(struct capref capref)
{
struct thread *queue;
spinlock_t lock;
};
-#define THREAD_SEM_INITIALIZER { .value = 0, .queue = NULL, .lock = 0 }
+#ifndef __cplusplus
+# define THREAD_SEM_INITIALIZER \
+ { .value = 0, .queue = NULL, .lock = 0 }
+#else
+# define THREAD_SEM_INITIALIZER \
+ { 0, (struct thread *)NULL, 0 }
+#endif
#endif
void *arg;
};
-#define MKCLOSURE(h,a) (struct event_closure){ .handler = (h), .arg = (a) }
+#define MKCLOSURE(h,a) (struct event_closure){ /*handler*/ (h), /*arg*/ (a) }
#define NOP_CLOSURE MKCLOSURE(NULL, NULL)
/**
};
/// Macro used for constructing return values from single-value syscalls
-#define SYSRET(x) (struct sysret){ .error = x, .value = 0 }
+#define SYSRET(x) (struct sysret){ /*error*/ x, /*value*/ 0 }
#endif // __ASSEMBLER__
/*
#define NFS_READDIR_COOKIE 0 ///< initial cookie for readdir
#define NFS_READDIR_COOKIEVERF NULL ///< initial cookie verifier for readder
-#define NULL_NFS_FH ((struct nfs_fh3) { .data_len = 0, .data_val = NULL })
+#define NULL_NFS_FH ((struct nfs_fh3) { /*data_len*/ 0, /*data_val*/ NULL })
struct nfs_client;
#include <octopus/definitions.h>
-#define NOP_TRIGGER (octopus_trigger_t){ .in_case = 0, .m = 0, .trigger = 0, .st = 0 }
+#define NOP_TRIGGER (octopus_trigger_t){ /*in_case*/ 0, /*send_to*/ 0, \
+ /*m*/ 0, /*trigger*/ 0, /*st*/ 0 }
typedef void(*trigger_handler_fn)(octopus_mode_t mode, char* record, void* state);
octopus_trigger_t oct_mktrigger(errval_t, octopus_binding_type_t, octopus_mode_t,