~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to erts/emulator/beam/beam_bp.h

  • Committer: Bazaar Package Importer
  • Author(s): Erlang Packagers, Sergei Golovan
  • Date: 2006-12-03 17:07:44 UTC
  • mfrom: (2.1.11 feisty)
  • Revision ID: james.westby@ubuntu.com-20061203170744-rghjwupacqlzs6kv
Tags: 1:11.b.2-4
[ Sergei Golovan ]
Fixed erlang-base and erlang-base-hipe prerm scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
    Sint            count;
73
73
} BpDataCount;
74
74
 
 
75
extern erts_smp_spinlock_t erts_bp_lock;
 
76
 
 
77
#ifdef ERTS_SMP
 
78
#define ErtsSmpBPLock(BDC) erts_smp_spin_lock(&erts_bp_lock)
 
79
#define ErtsSmpBPUnlock(BDC) erts_smp_spin_unlock(&erts_bp_lock)
 
80
#else
 
81
#define ErtsSmpBPLock(BDC)
 
82
#define ErtsSmpBPUnlock(BDC)
 
83
#endif
 
84
 
75
85
#define ErtsCountBreak(pc,instr_result)                     \
76
86
do {                                                        \
77
87
    BpDataCount *bdc = (BpDataCount *) (pc)[-4];            \
81
91
    bdc = (BpDataCount *) bdc->next;                        \
82
92
    ASSERT(bdc);                                            \
83
93
    (pc)[-4] = (Uint) bdc;                                  \
 
94
    ErtsSmpBPLock(bdc);                                     \
84
95
    if (bdc->count >= 0) bdc->count++;                      \
 
96
    ErtsSmpBPUnlock(bdc);                                   \
85
97
    *(instr_result) = bdc->orig_instr;                      \
86
98
} while (0)
87
99