@@ -191,7 +191,7 @@ class KMPHwlocAffinity : public KMPAffinity {
191191};
192192#endif /* KMP_USE_HWLOC */
193193
194- #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD
194+ #if KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DRAGONFLY
195195#if KMP_OS_LINUX
196196/* On some of the older OS's that we build on, these constants aren't present
197197 in <asm/unistd.h> #included from <sys.syscall.h>. They must be the same on
@@ -311,7 +311,7 @@ class KMPHwlocAffinity : public KMPAffinity {
311311#else
312312#error Unknown or unsupported architecture
313313#endif /* KMP_ARCH_* */
314- #elif KMP_OS_FREEBSD
314+ #elif KMP_OS_FREEBSD || KMP_OS_DRAGONFLY
315315#include < pthread.h>
316316#include < pthread_np.h>
317317#elif KMP_OS_NETBSD
@@ -410,7 +410,7 @@ class KMPNativeAffinity : public KMPAffinity {
410410#if KMP_OS_LINUX
411411 long retval =
412412 syscall (__NR_sched_getaffinity, 0 , __kmp_affin_mask_size, mask);
413- #elif KMP_OS_FREEBSD || KMP_OS_NETBSD
413+ #elif KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DRAGONFLY
414414 int r = pthread_getaffinity_np (pthread_self (), __kmp_affin_mask_size,
415415 reinterpret_cast <cpuset_t *>(mask));
416416 int retval = (r == 0 ? 0 : -1 );
@@ -431,7 +431,7 @@ class KMPNativeAffinity : public KMPAffinity {
431431#if KMP_OS_LINUX
432432 long retval =
433433 syscall (__NR_sched_setaffinity, 0 , __kmp_affin_mask_size, mask);
434- #elif KMP_OS_FREEBSD || KMP_OS_NETBSD
434+ #elif KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DRAGONFLY
435435 int r = pthread_setaffinity_np (pthread_self (), __kmp_affin_mask_size,
436436 reinterpret_cast <cpuset_t *>(mask));
437437 int retval = (r == 0 ? 0 : -1 );
@@ -474,7 +474,8 @@ class KMPNativeAffinity : public KMPAffinity {
474474 }
475475 api_type get_api_type () const override { return NATIVE_OS; }
476476};
477- #endif /* KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD */
477+ #endif /* KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_NETBSD || KMP_OS_DRAGONFLY \
478+ */
478479
479480#if KMP_OS_WINDOWS
480481class KMPNativeAffinity : public KMPAffinity {
0 commit comments