~ubuntu-branches/ubuntu/maverick/ghdl/maverick

« back to all changes in this revision

Viewing changes to gcc/gcc/config/spu/spu_mfcio.h

  • Committer: Bazaar Package Importer
  • Author(s): Wesley J. Landaker
  • Date: 2009-04-02 21:23:07 UTC
  • mfrom: (1.1.11 upstream) (3.2.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090402212307-01pkh97q9b3u1vea
Tags: 0.27+svn110+gcc4.3.3+dfsg-1
* Now using gcc-4.3.3
* Updated copyright information
* Added Vcs-Git information
* Updated to policy 3.8.1 

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
#define spu_write_srr0(srr0)          spu_writech(SPU_WrSRR0,srr0)
290
290
#define spu_read_srr0()               spu_readch(SPU_RdSRR0)
291
291
 
 
292
/* Interrupt-Safe Critical Sections */
 
293
 
 
294
static __inline__ unsigned int mfc_begin_critical_section (void)
 
295
  __attribute__ ((__always_inline__));
 
296
 
 
297
static __inline__ unsigned int
 
298
mfc_begin_critical_section (void)
 
299
{
 
300
#ifdef SPU_MFCIO_INTERRUPT_SAFE
 
301
  unsigned int __status = spu_read_machine_status ();
 
302
  spu_idisable ();
 
303
  return __status;
 
304
#else
 
305
  return 0;
 
306
#endif
 
307
}
 
308
 
 
309
static __inline__ void mfc_end_critical_section (unsigned int)
 
310
  __attribute__ ((__always_inline__));
 
311
 
 
312
static __inline__ void
 
313
mfc_end_critical_section (unsigned int __status __attribute__ ((__unused__)))
 
314
{
 
315
#ifdef SPU_MFCIO_INTERRUPT_SAFE
 
316
  if (__status & 1)
 
317
    spu_ienable ();
 
318
#endif
 
319
}
292
320
 
293
321
/* MFC Tag Manager */
294
322