Ticket #8077: 0001-In-the-non-threaded-RTS-make-_barrier-functions-EXTE.patch

File 0001-In-the-non-threaded-RTS-make-_barrier-functions-EXTE.patch, 1.1 KB (added by rrnewton, 9 months ago)
  • includes/stg/SMP.h

    From 7d45f9ad26a5d42bef788e4316f488c0ce35e2f1 Mon Sep 17 00:00:00 2001
    From: Ryan Newton <rrnewton@gmail.com>
    Date: Thu, 1 Aug 2013 12:18:16 -0400
    Subject: [PATCH] In the non-threaded RTS, make *_barrier functions
     EXTERN_INLINE, not #define. (fixes #8077)
    
    ---
     includes/stg/SMP.h |    9 ++++++---
     1 file changed, 6 insertions(+), 3 deletions(-)
    
    diff --git a/includes/stg/SMP.h b/includes/stg/SMP.h
    index bfd6bbc..99c25fe 100644
    a b load_load_barrier(void) { 
    365365/* ---------------------------------------------------------------------- */ 
    366366#else /* !THREADED_RTS */ 
    367367 
    368 #define write_barrier()      /* nothing */ 
    369 #define store_load_barrier() /* nothing */ 
    370 #define load_load_barrier()  /* nothing */ 
     368EXTERN_INLINE void write_barrier(void); 
     369EXTERN_INLINE void store_load_barrier(void); 
     370EXTERN_INLINE void load_load_barrier(void); 
     371EXTERN_INLINE void write_barrier     () {} /* nothing */ 
     372EXTERN_INLINE void store_load_barrier() {} /* nothing */ 
     373EXTERN_INLINE void load_load_barrier () {} /* nothing */ 
    371374 
    372375#if !IN_STG_CODE || IN_STGCRUN 
    373376INLINE_HEADER StgWord