From 1922b5a9d9b2fb939334d4095ae139ded25d7e27 Mon Sep 17 00:00:00 2001 From: sof <unknown> Date: Thu, 14 Jan 1999 18:36:18 +0000 Subject: [PATCH] [project @ 1999-01-14 18:36:18 by sof] added isEmptyMVarZh macro --- ghc/includes/PrimOps.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h index 5a241b18a093..8bf3c3628c58 100644 --- a/ghc/includes/PrimOps.h +++ b/ghc/includes/PrimOps.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.h,v 1.4 1999/01/14 11:57:48 sewardj Exp $ + * $Id: PrimOps.h,v 1.5 1999/01/14 18:36:18 sof Exp $ * * Macros for primitive operations in STG-ish C code. * @@ -607,6 +607,9 @@ EF_(newMutVarZh_fast); -------------------------------------------------------------------------- */ #define sameMVarZh(r,a,b) r=(I_)((a)==(b)) + +/* Assume external decl of EMPTY_MVAR_info is in scope by now */ +#define isEmptyMVarZh(r,a) r=(I_)((GET_INFO((StgMVar*)(a))) == &EMPTY_MVAR_info ) EF_(newMVarZh_fast); EF_(takeMVarZh_fast); EF_(putMVarZh_fast); -- GitLab