Module Name: src Committed By: christos Date: Sun Jan 26 16:31:40 UTC 2025
Added Files: src/external/mpl/bind/include/isc: lint-atomic.h probes.h Log Message: new files To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/mpl/bind/include/isc/lint-atomic.h \ src/external/mpl/bind/include/isc/probes.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/external/mpl/bind/include/isc/lint-atomic.h diff -u /dev/null src/external/mpl/bind/include/isc/lint-atomic.h:1.1 --- /dev/null Sun Jan 26 11:31:40 2025 +++ src/external/mpl/bind/include/isc/lint-atomic.h Sun Jan 26 11:31:40 2025 @@ -0,0 +1,26 @@ +/* $NetBSD: lint-atomic.h,v 1.1 2025/01/26 16:31:40 christos Exp $ */ + +/* + * Definitions for clang's atomic builtins + */ + +#ifdef __clang__ + +#define __c11_atomic_init(a, b) (*(a) = (b)) + +#define __c11_atomic_load(a, m) (*(a)) +#define __c11_atomic_store(a, b, m) (*(a) = (b)) + +#define __c11_atomic_fetch_add(a, b, m) (*(a) += (b)) +#define __c11_atomic_fetch_sub(a, b, m) (*(a) -= (b)) +#define __c11_atomic_fetch_or(a, b, m) (*(a) |= (b)) +#define __c11_atomic_fetch_and(a, b, m) (*(a) &= (b)) + +#define __c11_atomic_exchange(a, b, m) (*(a) = (b)) + +#define __c11_atomic_compare_exchange_strong(a, b, e, d, m) \ + ((*(a) == (e)) ? (*(b) = (d)) : 0) +#define __c11_atomic_compare_exchange_weak(a, b, e, d, m) \ + ((*(a) == (e)) ? (*(b) = (d)) : 0) + +#endif Index: src/external/mpl/bind/include/isc/probes.h diff -u /dev/null src/external/mpl/bind/include/isc/probes.h:1.1 --- /dev/null Sun Jan 26 11:31:40 2025 +++ src/external/mpl/bind/include/isc/probes.h Sun Jan 26 11:31:40 2025 @@ -0,0 +1,269 @@ +/* + * Generated by dtrace(1M). + */ + +#ifndef _PROBES_H +#define _PROBES_H + +#include <unistd.h> + +#ifdef __cplusplus +extern "C" { +#endif + +#include <sys/sdt.h> + +#if defined(DTRACE) && _DTRACE_VERSION + +#define LIBISC_JOB_CB_AFTER(arg0, arg1, arg2) \ + __dtrace_libisc___job_cb_after(arg0, arg1, arg2) +#ifndef __sparc +#define LIBISC_JOB_CB_AFTER_ENABLED() \ + __dtraceenabled_libisc___job_cb_after() +#else +#define LIBISC_JOB_CB_AFTER_ENABLED() \ + __dtraceenabled_libisc___job_cb_after(0) +#endif +#define LIBISC_JOB_CB_BEFORE(arg0, arg1, arg2) \ + __dtrace_libisc___job_cb_before(arg0, arg1, arg2) +#ifndef __sparc +#define LIBISC_JOB_CB_BEFORE_ENABLED() \ + __dtraceenabled_libisc___job_cb_before() +#else +#define LIBISC_JOB_CB_BEFORE_ENABLED() \ + __dtraceenabled_libisc___job_cb_before(0) +#endif +#define LIBISC_RWLOCK_DESTROY(arg0) \ + __dtrace_libisc___rwlock_destroy(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_DESTROY_ENABLED() \ + __dtraceenabled_libisc___rwlock_destroy() +#else +#define LIBISC_RWLOCK_DESTROY_ENABLED() \ + __dtraceenabled_libisc___rwlock_destroy(0) +#endif +#define LIBISC_RWLOCK_DOWNGRADE(arg0) \ + __dtrace_libisc___rwlock_downgrade(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_DOWNGRADE_ENABLED() \ + __dtraceenabled_libisc___rwlock_downgrade() +#else +#define LIBISC_RWLOCK_DOWNGRADE_ENABLED() \ + __dtraceenabled_libisc___rwlock_downgrade(0) +#endif +#define LIBISC_RWLOCK_INIT(arg0) \ + __dtrace_libisc___rwlock_init(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_INIT_ENABLED() \ + __dtraceenabled_libisc___rwlock_init() +#else +#define LIBISC_RWLOCK_INIT_ENABLED() \ + __dtraceenabled_libisc___rwlock_init(0) +#endif +#define LIBISC_RWLOCK_RDLOCK_ACQ(arg0) \ + __dtrace_libisc___rwlock_rdlock_acq(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_RDLOCK_ACQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_rdlock_acq() +#else +#define LIBISC_RWLOCK_RDLOCK_ACQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_rdlock_acq(0) +#endif +#define LIBISC_RWLOCK_RDLOCK_REQ(arg0) \ + __dtrace_libisc___rwlock_rdlock_req(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_RDLOCK_REQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_rdlock_req() +#else +#define LIBISC_RWLOCK_RDLOCK_REQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_rdlock_req(0) +#endif +#define LIBISC_RWLOCK_RDUNLOCK(arg0) \ + __dtrace_libisc___rwlock_rdunlock(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_RDUNLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_rdunlock() +#else +#define LIBISC_RWLOCK_RDUNLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_rdunlock(0) +#endif +#define LIBISC_RWLOCK_TRYRDLOCK(arg0, arg1) \ + __dtrace_libisc___rwlock_tryrdlock(arg0, arg1) +#ifndef __sparc +#define LIBISC_RWLOCK_TRYRDLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_tryrdlock() +#else +#define LIBISC_RWLOCK_TRYRDLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_tryrdlock(0) +#endif +#define LIBISC_RWLOCK_TRYUPGRADE(arg0, arg1) \ + __dtrace_libisc___rwlock_tryupgrade(arg0, arg1) +#ifndef __sparc +#define LIBISC_RWLOCK_TRYUPGRADE_ENABLED() \ + __dtraceenabled_libisc___rwlock_tryupgrade() +#else +#define LIBISC_RWLOCK_TRYUPGRADE_ENABLED() \ + __dtraceenabled_libisc___rwlock_tryupgrade(0) +#endif +#define LIBISC_RWLOCK_TRYWRLOCK(arg0, arg1) \ + __dtrace_libisc___rwlock_trywrlock(arg0, arg1) +#ifndef __sparc +#define LIBISC_RWLOCK_TRYWRLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_trywrlock() +#else +#define LIBISC_RWLOCK_TRYWRLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_trywrlock(0) +#endif +#define LIBISC_RWLOCK_WRLOCK_ACQ(arg0) \ + __dtrace_libisc___rwlock_wrlock_acq(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_WRLOCK_ACQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_wrlock_acq() +#else +#define LIBISC_RWLOCK_WRLOCK_ACQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_wrlock_acq(0) +#endif +#define LIBISC_RWLOCK_WRLOCK_REQ(arg0) \ + __dtrace_libisc___rwlock_wrlock_req(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_WRLOCK_REQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_wrlock_req() +#else +#define LIBISC_RWLOCK_WRLOCK_REQ_ENABLED() \ + __dtraceenabled_libisc___rwlock_wrlock_req(0) +#endif +#define LIBISC_RWLOCK_WRUNLOCK(arg0) \ + __dtrace_libisc___rwlock_wrunlock(arg0) +#ifndef __sparc +#define LIBISC_RWLOCK_WRUNLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_wrunlock() +#else +#define LIBISC_RWLOCK_WRUNLOCK_ENABLED() \ + __dtraceenabled_libisc___rwlock_wrunlock(0) +#endif + + +extern void __dtrace_libisc___job_cb_after(void *, void *, void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___job_cb_after(void); +#else +extern int __dtraceenabled_libisc___job_cb_after(long); +#endif +extern void __dtrace_libisc___job_cb_before(void *, void *, void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___job_cb_before(void); +#else +extern int __dtraceenabled_libisc___job_cb_before(long); +#endif +extern void __dtrace_libisc___rwlock_destroy(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_destroy(void); +#else +extern int __dtraceenabled_libisc___rwlock_destroy(long); +#endif +extern void __dtrace_libisc___rwlock_downgrade(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_downgrade(void); +#else +extern int __dtraceenabled_libisc___rwlock_downgrade(long); +#endif +extern void __dtrace_libisc___rwlock_init(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_init(void); +#else +extern int __dtraceenabled_libisc___rwlock_init(long); +#endif +extern void __dtrace_libisc___rwlock_rdlock_acq(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_rdlock_acq(void); +#else +extern int __dtraceenabled_libisc___rwlock_rdlock_acq(long); +#endif +extern void __dtrace_libisc___rwlock_rdlock_req(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_rdlock_req(void); +#else +extern int __dtraceenabled_libisc___rwlock_rdlock_req(long); +#endif +extern void __dtrace_libisc___rwlock_rdunlock(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_rdunlock(void); +#else +extern int __dtraceenabled_libisc___rwlock_rdunlock(long); +#endif +extern void __dtrace_libisc___rwlock_tryrdlock(void *, int); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_tryrdlock(void); +#else +extern int __dtraceenabled_libisc___rwlock_tryrdlock(long); +#endif +extern void __dtrace_libisc___rwlock_tryupgrade(void *, int); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_tryupgrade(void); +#else +extern int __dtraceenabled_libisc___rwlock_tryupgrade(long); +#endif +extern void __dtrace_libisc___rwlock_trywrlock(void *, int); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_trywrlock(void); +#else +extern int __dtraceenabled_libisc___rwlock_trywrlock(long); +#endif +extern void __dtrace_libisc___rwlock_wrlock_acq(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_wrlock_acq(void); +#else +extern int __dtraceenabled_libisc___rwlock_wrlock_acq(long); +#endif +extern void __dtrace_libisc___rwlock_wrlock_req(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_wrlock_req(void); +#else +extern int __dtraceenabled_libisc___rwlock_wrlock_req(long); +#endif +extern void __dtrace_libisc___rwlock_wrunlock(void *); +#ifndef __sparc +extern int __dtraceenabled_libisc___rwlock_wrunlock(void); +#else +extern int __dtraceenabled_libisc___rwlock_wrunlock(long); +#endif + +#else + +#define LIBISC_JOB_CB_AFTER(arg0, arg1, arg2) +#define LIBISC_JOB_CB_AFTER_ENABLED() (0) +#define LIBISC_JOB_CB_BEFORE(arg0, arg1, arg2) +#define LIBISC_JOB_CB_BEFORE_ENABLED() (0) +#define LIBISC_RWLOCK_DESTROY(arg0) +#define LIBISC_RWLOCK_DESTROY_ENABLED() (0) +#define LIBISC_RWLOCK_DOWNGRADE(arg0) +#define LIBISC_RWLOCK_DOWNGRADE_ENABLED() (0) +#define LIBISC_RWLOCK_INIT(arg0) +#define LIBISC_RWLOCK_INIT_ENABLED() (0) +#define LIBISC_RWLOCK_RDLOCK_ACQ(arg0) +#define LIBISC_RWLOCK_RDLOCK_ACQ_ENABLED() (0) +#define LIBISC_RWLOCK_RDLOCK_REQ(arg0) +#define LIBISC_RWLOCK_RDLOCK_REQ_ENABLED() (0) +#define LIBISC_RWLOCK_RDUNLOCK(arg0) +#define LIBISC_RWLOCK_RDUNLOCK_ENABLED() (0) +#define LIBISC_RWLOCK_TRYRDLOCK(arg0, arg1) +#define LIBISC_RWLOCK_TRYRDLOCK_ENABLED() (0) +#define LIBISC_RWLOCK_TRYUPGRADE(arg0, arg1) +#define LIBISC_RWLOCK_TRYUPGRADE_ENABLED() (0) +#define LIBISC_RWLOCK_TRYWRLOCK(arg0, arg1) +#define LIBISC_RWLOCK_TRYWRLOCK_ENABLED() (0) +#define LIBISC_RWLOCK_WRLOCK_ACQ(arg0) +#define LIBISC_RWLOCK_WRLOCK_ACQ_ENABLED() (0) +#define LIBISC_RWLOCK_WRLOCK_REQ(arg0) +#define LIBISC_RWLOCK_WRLOCK_REQ_ENABLED() (0) +#define LIBISC_RWLOCK_WRUNLOCK(arg0) +#define LIBISC_RWLOCK_WRUNLOCK_ENABLED() (0) + +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _PROBES_H */