NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Dealing with absence of PTHREAD_MUTEX_ERRORCHECK_NP in NetBSD [ Was Re: XSB Prolog added to wip ]



On Sat, Aug 13, 2022 at 01:09:17AM +0530, Mayuresh wrote:

In particular, I am unsure about this patch. PTHREAD_MUTEX_ERRORCHECK_NP
isn't available on NetBSD 9.x (may be it would come in 10). I just
replaced it with PTHREAD_MUTEX_ERRORCHECK, but not sure what is the right
patch for this.

    +#if defined(__NetBSD__)
    +#    define PTHREAD_MUTEX_ERRORCHECK_NP PTHREAD_MUTEX_ERRORCHECK
    +#endif


That looks about right (and is just what's being done in XSB/emu/thread_xsb.h):

```
    218 #if defined(DARWIN) || defined(FREEBSD) || defined(SOLARIS) || defined(CYGWIN)
    219
    220 #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
    221 #define PTHREAD_MUTEX_ERRORCHECK_NP PTHREAD_MUTEX_ERRORCHECK
    222 #define PTHREAD_MUTEX_FAST_NP PTHREAD_MUTEX_NORMAL
    223
    224 #endif
```

Define `NETBSD` somewhere (xref the FREEBSD stuff in XSB/build/def_config.in &
XSB/build/configure.in).

-RVP


Home | Main Index | Thread Index | Old Index