Add to MANIFEST: README.threads, lib/ISA.pm, lib/Class/Fields.pm
[p5sagit/p5-mst-13.2.git] / cv.h
diff --git a/cv.h b/cv.h
index b29793f..1e6b8de 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -1,6 +1,6 @@
 /*    cv.h
  *
- *    Copyright (c) 1991-1994, Larry Wall
+ *    Copyright (c) 1991-1997, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -28,6 +28,11 @@ struct xpvcv {
     long       xcv_depth;              /* >= 2 indicates recursive call */
     AV *       xcv_padlist;
     CV *       xcv_outside;
+#ifdef USE_THREADS
+    perl_mutex *xcv_mutexp;
+    perl_cond *        xcv_condp;      /* signalled when owner leaves CV */
+    struct thread *xcv_owner;  /* current owner thread */
+#endif /* USE_THREADS */
     U8         xcv_flags;
 };
 
@@ -43,6 +48,11 @@ struct xpvcv {
 #define CvDEPTH(sv)    ((XPVCV*)SvANY(sv))->xcv_depth
 #define CvPADLIST(sv)  ((XPVCV*)SvANY(sv))->xcv_padlist
 #define CvOUTSIDE(sv)  ((XPVCV*)SvANY(sv))->xcv_outside
+#ifdef USE_THREADS
+#define CvMUTEXP(sv)   ((XPVCV*)SvANY(sv))->xcv_mutexp
+#define CvCONDP(sv)    ((XPVCV*)SvANY(sv))->xcv_condp
+#define CvOWNER(sv)    ((XPVCV*)SvANY(sv))->xcv_owner
+#endif /* USE_THREADS */
 #define CvFLAGS(sv)    ((XPVCV*)SvANY(sv))->xcv_flags
 
 #define CVf_CLONE      0x01    /* anon CV uses external lexicals */
@@ -52,7 +62,6 @@ struct xpvcv {
 #define CVf_UNIQUE     0x10    /* can't be cloned */
 #define CVf_NODEBUG    0x20    /* no DB::sub indirection for this CV
                                   (esp. useful for special XSUBs) */
-#define CVf_FORMAT     0x40    /* is a format, not a sub */
 
 #define CvCLONE(cv)            (CvFLAGS(cv) & CVf_CLONE)
 #define CvCLONE_on(cv)         (CvFLAGS(cv) |= CVf_CLONE)
@@ -74,10 +83,6 @@ struct xpvcv {
 #define CvUNIQUE_on(cv)                (CvFLAGS(cv) |= CVf_UNIQUE)
 #define CvUNIQUE_off(cv)       (CvFLAGS(cv) &= ~CVf_UNIQUE)
 
-#define CvFORMAT(cv)           (CvFLAGS(cv) & CVf_FORMAT)
-#define CvFORMAT_on(cv)                (CvFLAGS(cv) |= CVf_FORMAT)
-#define CvFORMAT_off(cv)       (CvFLAGS(cv) &= ~CVf_FORMAT)
-
 #define CvNODEBUG(cv)          (CvFLAGS(cv) & CVf_NODEBUG)
 #define CvNODEBUG_on(cv)       (CvFLAGS(cv) |= CVf_NODEBUG)
 #define CvNODEBUG_off(cv)      (CvFLAGS(cv) &= ~CVf_NODEBUG)