Re: AOO plugin for PD on SGI Irix

Wolfgang Gaggl via Pd-list <[email protected]> Sun, 19 Jul 2026 17:43:53 -0000
Newsgroups gmane.comp.multimedia.puredata.general
Message-ID <[email protected]>
...sent that last reply to quickly. 
added a poor-mans pause_cpu() implementation for the above lock retry case:
inline void pause_cpu() {
#if defined(_MSC_VER)
    YieldProcessor();
#elif defined(__SSE2__)
    _mm_pause();
#elif defined(__aarch64__)
    __asm__ __volatile__("isb");
#elif defined(__arm__)
    __asm__ __volatile__("yield");
#elif defined(__mips__)
# if (defined(_MIPS_ARCH_MIPS32R2) || defined(_MIPS_ARCH_MIPS64R2)) || \
     (defined(__mips_isa_rev) && __mips_isa_rev >= 2)
    // MIPS32r2+: PAUSE instruction (architectural spin-loop hint)
    __asm__ __volatile__(".set push\n\t"
                         ".set mips32r2\n\t"
                         "pause\n\t"
                         ".set pop");
# else
    // MIPS4 / R10000 / R12000: SSNOP (SuperScalar NO-OP)
    // Encoding: sll $0,$0,1  (sa=1 distinguishes SSNOP from plain NOP sa=0)
    // Writing to $0 is a no-op data-wise; the sa=1 field tells the CPU not to
    // dual-issue the following instruction, reducing bus pressure in spin loops.
    __asm__ __volatile__("sll $0,$0,1");
# endif

That works now for me without clicks and crackling.
---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/FLHJJLJIH5ZOABTCT6QMQ3J6V3JQVBWU/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/