commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9825 - in gnuradio/branches/developers/eb/gcell-wip:


From: eb
Subject: [Commit-gnuradio] r9825 - in gnuradio/branches/developers/eb/gcell-wip: config gcell/include gcell/include/gcell
Date: Wed, 22 Oct 2008 11:50:45 -0600 (MDT)

Author: eb
Date: 2008-10-22 11:50:44 -0600 (Wed, 22 Oct 2008)
New Revision: 9825

Added:
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/Makefile.am
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/compiler.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_atomic.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_cdefs.h
   
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_declare_proc.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue.h
   
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue_data.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_stack.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc.h
   
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc_private.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_logging.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_mbox.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_spu_args.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_types.h
   
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/memory_barrier.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/spu/
Removed:
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/Makefile.am
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/compiler.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_atomic.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_cdefs.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_declare_proc.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_queue.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_queue_data.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_stack.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_job_desc.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_job_desc_private.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_logging.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_mbox.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_spu_args.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_types.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/memory_barrier.h
   gnuradio/branches/developers/eb/gcell-wip/gcell/include/spu/
Modified:
   gnuradio/branches/developers/eb/gcell-wip/config/grc_gcell.m4
Log:
mv gcell/include/* gcell/include/gcell

Modified: gnuradio/branches/developers/eb/gcell-wip/config/grc_gcell.m4
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/config/grc_gcell.m4       
2008-10-22 17:46:06 UTC (rev 9824)
+++ gnuradio/branches/developers/eb/gcell-wip/config/grc_gcell.m4       
2008-10-22 17:50:44 UTC (rev 9825)
@@ -50,17 +50,17 @@
 
     if test $passed != with; then
        dnl how and where to find INCLUDES and LA
-       gcell_INCLUDES="-I\${abs_top_srcdir}/gcell/src/include \
-                -I\${abs_top_srcdir}/gcell/src/lib/runtime \
-                -I\${abs_top_srcdir}/gcell/src/lib/general \
-                -I\${abs_top_srcdir}/gcell/src/lib/wrapper"
-        gcell_LA="\${abs_top_builddir}/gcell/src/lib/libgcell.la"
-       gcell_spu_INCLUDES="-I\${abs_top_srcdir}/gcell/src/include/spu \
-                -I\${abs_top_srcdir}/gcell/src/include \
-                -I\${abs_top_srcdir}/gcell/src/lib/runtime/spu \
-                -I\${abs_top_srcdir}/gcell/src/lib/general/spu \
-                -I\${abs_top_srcdir}/gcell/src/lib/wrapper/spu"
-       gcell_spu_LA="\${abs_top_builddir}/gcell/src/lib/spu/libgcell_spu.a"
+       gcell_INCLUDES="-I\${abs_top_srcdir}/gcell/include \
+                -I\${abs_top_srcdir}/gcell/lib/runtime \
+                -I\${abs_top_srcdir}/gcell/lib/general \
+                -I\${abs_top_srcdir}/gcell/lib/wrapper"
+        gcell_LA="\${abs_top_builddir}/gcell/lib/libgcell.la"
+       gcell_spu_INCLUDES="-I\${abs_top_srcdir}/gcell/include/spu \
+                -I\${abs_top_srcdir}/gcell/include \
+                -I\${abs_top_srcdir}/gcell/lib/runtime/spu \
+                -I\${abs_top_srcdir}/gcell/lib/general/spu \
+                -I\${abs_top_srcdir}/gcell/lib/wrapper/spu"
+       gcell_spu_LA="\${abs_top_builddir}/gcell/lib/spu/libgcell_spu.a"
        AC_SUBST(gcell_spu_INCLUDES)
        AC_SUBST(gcell_spu_LA)
 
@@ -73,17 +73,18 @@
     AC_CONFIG_FILES([ \
         gcell/Makefile \
         gcell/gcell.pc \
-        gcell/src/Makefile \
-        gcell/src/include/Makefile \
-        gcell/src/include/spu/Makefile \
-        gcell/src/lib/Makefile \
-        gcell/src/lib/spu/Makefile \
-        gcell/src/lib/general/Makefile \
-        gcell/src/lib/wrapper/Makefile \
-        gcell/src/lib/runtime/Makefile \
-        gcell/src/apps/Makefile \
-       gcell/src/apps/spu/Makefile \
-       gcell/src/ibm/Makefile \
+        gcell/Makefile \
+       gcell/include/Makefile \
+        gcell/include/gcell/Makefile \
+        gcell/include/gcell/spu/Makefile \
+        gcell/lib/Makefile \
+        gcell/lib/spu/Makefile \
+        gcell/lib/general/Makefile \
+        gcell/lib/wrapper/Makefile \
+        gcell/lib/runtime/Makefile \
+        gcell/apps/Makefile \
+       gcell/apps/spu/Makefile \
+       gcell/ibm/Makefile \
     ])
 
     GRC_BUILD_CONDITIONAL(gcell)

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/Makefile.am

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/compiler.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_atomic.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_cdefs.h

Deleted: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_declare_proc.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_queue.h

Deleted: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_queue_data.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_stack.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_job_desc.h

Deleted: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_job_desc_private.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_logging.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_mbox.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_spu_args.h

Deleted: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_types.h

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/Makefile.am (from 
rev 9823, gnuradio/branches/developers/eb/gcell-wip/gcell/include/Makefile.am)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/Makefile.am   
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/Makefile.am   
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,39 @@
+#
+# Copyright 2007,2008 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+include $(top_srcdir)/Makefile.common
+
+SUBDIRS = spu
+
+gcellinclude_HEADERS = \
+       compiler.h \
+       gc_atomic.h \
+       gc_cdefs.h \
+       gc_declare_proc.h \
+       gc_jd_queue_data.h \
+       gc_jd_queue.h \
+       gc_jd_stack.h \
+       gc_job_desc.h \
+       gc_job_desc_private.h \
+       gc_logging.h \
+       gc_mbox.h \
+       gc_spu_args.h \
+       gc_types.h \
+       memory_barrier.h

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/compiler.h (from 
rev 9823, gnuradio/branches/developers/eb/gcell-wip/gcell/include/compiler.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/compiler.h    
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/compiler.h    
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,45 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_COMPILER_H
+#define INCLUDED_COMPILER_H
+
+/*!
+ * \brief Compiler specific hackery.  These are for GCC.
+ */
+
+#define _AL8   __attribute__((aligned (8)))
+#define _AL16  __attribute__((aligned (16)))
+#define _AL128 __attribute__((aligned (128)))
+
+#define _UNUSED __attribute__((unused))
+
+#ifndef likely
+#define likely(x)       __builtin_expect(!!(x), 1)
+#define unlikely(x)     __builtin_expect(!!(x), 0)
+#endif
+
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER)  __builtin_offsetof (TYPE, MEMBER)
+#endif
+
+
+#endif /* INCLUDED_COMPILER_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_atomic.h (from 
rev 9823, gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_atomic.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_atomic.h   
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_atomic.h   
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,29 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GC_ATOMIC_H
+#define INCLUDED_GC_ATOMIC_H
+
+#include <stdint.h>
+
+typedef uint32_t       gc_atomic_t;
+
+
+#endif /* INCLUDED_GC_ATOMIC_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_cdefs.h (from 
rev 9823, gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_cdefs.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_cdefs.h    
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_cdefs.h    
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,34 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_CDEFS_H
+#define INCLUDED_GC_CDEFS_H
+
+/* C++ needs to know that types and declarations are C, not C++.  */
+#ifdef __cplusplus
+# define __GC_BEGIN_DECLS      extern "C" {
+# define __GC_END_DECLS        }
+#else
+# define __GC_BEGIN_DECLS
+# define __GC_END_DECLS
+#endif
+
+#endif /* INCLUDED_GC_CDEFS_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_declare_proc.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_declare_proc.h)
===================================================================
--- 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_declare_proc.h 
                            (rev 0)
+++ 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_declare_proc.h 
    2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,64 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GC_DECLARE_PROC_H
+#define INCLUDED_GC_DECLARE_PROC_H
+
+#include <stdint.h>
+#include <gc_job_desc.h>
+
+/*
+ * This is C, not C++ code...
+ *
+ * ...and is used by both PPE and SPE code
+ */
+__GC_BEGIN_DECLS
+
+#define GC_PROC_DEF_SECTION ".gcell.proc_def"
+
+typedef struct gc_proc_def {
+#if defined(__SPU__)
+  gc_spu_proc_t        proc;
+#else
+  uint32_t     proc;
+#endif
+  char         name[28];
+} _AL16 gc_proc_def_t;
+
+
+#if defined(__SPU__)
+/*!
+ * \brief Tell gcell about a SPU procedure
+ *
+ * \param _proc_   pointer to function (gc_spu_proc_t)
+ * \param _name_   the name of the procedure ("quoted string")
+ *
+ * This macro registers the given procedure with the gcell runtime.
+ * From the PPE, use gc_job_manager::lookup_proc to map \p _name_ to a 
gc_proc_id_t
+ */
+#define GC_DECLARE_PROC(_proc_, _name_) \
+static struct gc_proc_def \
+  _GCPD_ ## _proc_ __attribute__((section(GC_PROC_DEF_SECTION), used)) = \
+  { _proc_, _name_ }
+#endif
+
+__GC_END_DECLS
+
+#endif /* INCLUDED_GC_DECLARE_PROC_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_queue.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue.h 
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue.h 
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_JD_QUEUE_H
+#define INCLUDED_GC_JD_QUEUE_H
+
+#include "gc_jd_queue_data.h"
+
+__GC_BEGIN_DECLS
+
+/*!
+ * \brief Initialize the queue to empty.
+ */
+void 
+gc_jd_queue_init(gc_jd_queue_t *q);
+  
+
+/*!
+ * \brief Add \p item to the tail of \p q.
+ */
+void 
+gc_jd_queue_enqueue(gc_jd_queue_t *q, gc_job_desc_t *item);
+
+
+/*!
+ * \brief Remove and return item at head of queue, or 0 if queue is empty
+ */
+gc_job_desc_t *
+gc_jd_queue_dequeue(gc_jd_queue_t *q);
+
+__GC_END_DECLS
+
+
+#endif /* INCLUDED_GC_JD_QUEUE_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue_data.h
 (from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_queue_data.h)
===================================================================
--- 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue_data.h
                            (rev 0)
+++ 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_queue_data.h
    2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_JD_QUEUE_DATA_H
+#define INCLUDED_GC_JD_QUEUE_DATA_H
+
+#include "gc_types.h"
+#include "gc_job_desc.h"
+
+__GC_BEGIN_DECLS
+
+/*!
+ * \brief (Lock free someday...) queue for job descriptors
+ *
+ * This is the main data structure shared between PPEs and SPEs.
+ * It is used to enqueue work for SPEs.  SPEs or PPEs may enqueue
+ * work.  SPE's dequeue from here.
+ *
+ * FIXME make it lock free ;)  For now, use a spin lock.
+ *
+ * (Fills a single cache line)
+ */
+typedef struct gc_jd_queue
+{
+  gc_eaddr_t   head  _AL16;
+  gc_eaddr_t   tail  _AL16;
+  uint32_t     mutex _AL16;            // libsync mutex (spin lock)
+} _AL128 gc_jd_queue_t;
+
+__GC_END_DECLS
+
+#endif /* INCLUDED_GC_JD_QUEUE_DATA_H */
+
+

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_stack.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_jd_stack.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_stack.h 
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_jd_stack.h 
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,70 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_JD_STACK_H
+#define INCLUDED_GC_JD_STACK_H
+
+#include "gc_types.h"
+#include "gc_job_desc.h"
+
+__GC_BEGIN_DECLS
+
+/*!
+ * \brief Lock free stack for job descriptors (used for free list)
+ *
+ * This is aligned to a cache line, and fills the cache line,
+ * to avoid inadvertently losing reservations created with
+ * the load-and-reserve instructions.
+ */
+
+typedef struct gc_jd_stack
+{
+  gc_eaddr_t   top;
+
+  // pad out to a full cache line
+  uint8_t      _pad[128 - sizeof(gc_eaddr_t)];
+} _AL128 gc_jd_stack_t;
+
+
+/*!
+ * \brief Initialize the stack to empty.
+ */
+void 
+gc_jd_stack_init(gc_jd_stack_t *stack);
+  
+
+/*!
+ * \brief Add \p item to the top of \p stack.
+ */
+void 
+gc_jd_stack_push(gc_jd_stack_t *stack, gc_job_desc_t *item);
+
+
+/*!
+ * \brief pop and return top item on stack, or 0 if stack is empty
+ */
+gc_job_desc_t *
+gc_jd_stack_pop(gc_jd_stack_t *stack);
+
+__GC_END_DECLS
+
+
+#endif /* INCLUDED_GC_JD_STACK_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_job_desc.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc.h 
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc.h 
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,213 @@
+/* -*- c -*- */
+/*
+ * Copyright 2007,2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_JOB_DESC_H
+#define INCLUDED_GC_JOB_DESC_H
+
+/*!
+ * This file contains the structures that are used to describe how to
+ * call "jobs" that execute on the SPEs.  A "job" is a task, or piece of
+ * work that you want to run on an SPE.
+ *
+ * There is code running in the SPE that knows how to interpret
+ * these job descriptions. Thus, in most cases, the overhead
+ * of invoking these is very low.
+ *
+ * The whole "job idea" is SPE centric.  At first pass,
+ * the PPE will be constructing jobs and enqueing them.
+ * However, there is nothing in the implementation that
+ * prohibits SPEs from creating their own jobs in the
+ * future.  Also, there is nothing prohibiting SPE-to-SPE
+ * DMA's.
+ *
+ * SPE's dequeue and "pull" jobs to themselves, do the work, then
+ * notify the entity that submitted the job.
+ */
+
+#include "gc_types.h"
+#include "gc_job_desc_private.h"
+
+/*
+ * This is C, not C++ code...
+ *
+ * ...and is used by both PPE and SPE code
+ */
+__GC_BEGIN_DECLS
+
+
+//! opaque ID that specifies which code to invoke on the SPE
+typedef uint32_t gc_proc_id_t;
+#define GCP_UNKNOWN_PROC ((gc_proc_id_t) -1)
+
+
+//! final job status
+typedef enum {
+  JS_OK,
+  JS_SHUTTING_DOWN,        // job mananger is shutting down
+  JS_TOO_MANY_CLIENTS,     // too many client threads
+  JS_UNKNOWN_PROC,         // didn't recognize the procedure ID
+  JS_BAD_DIRECTION,        // EA arg has invalid direction
+  JS_BAD_EAH,              // not all EA args have the same high 32 address 
bits
+  JS_BAD_N_DIRECT,         // too many direct args
+  JS_BAD_N_EA,             // too many EA args
+  JS_ARGS_TOO_LONG,        // total length of EA args exceeds limit
+  JS_BAD_JUJU,             // misc problem: you're having a bad day
+  JS_BAD_JOB_DESC,         // gc_job_desc was not allocated using 
mgr->alloc_job_desc()
+
+} gc_job_status_t;
+
+#define MAX_ARGS_DIRECT  8  // maximum number of args passed using "direct" 
method
+#define MAX_ARGS_EA     8  // maximum number of args passed via EA memory (dma)
+
+/*
+ * We support two classes of arguments,
+ *   "direct", which are contained in the gc_job_desc_args and
+ *   "EA", which are copied in/out according to info in gc_job_desc_args
+ */
+
+/*!
+ * \brief Tag type of "direct" argument
+ */
+typedef enum {
+  GCT_S32,
+  GCT_U32,
+  GCT_S64,
+  GCT_U64,
+  GCT_FLOAT,
+  GCT_DOUBLE,
+  GCT_FLT_CMPLX,
+  GCT_DBL_CMPLX,
+  GCT_EADDR,
+
+} gc_tag_t;
+
+
+/*!
+ * \brief union for passing "direct" argument
+ */
+typedef union gc_arg_union
+{
+  int32_t       s32;
+  uint32_t      u32;
+  int64_t       s64;
+  uint64_t      u64;
+  float                 f;
+  double        d;
+  //float complex  cf; //  64-bits (C99)
+  //double complex cd;  // 128-bits (C99)
+  gc_eaddr_t    ea;    //  64-bits
+} _AL8 gc_arg_union_t;
+
+
+/*!
+ * \brief "direct" input or output arguments
+ */
+typedef struct gc_job_direct_args
+{
+  uint32_t       nargs;                        // # of "direct" args
+  gc_tag_t       tag[MAX_ARGS_DIRECT] _AL16;   // type of direct arg[i]
+  gc_arg_union_t  arg[MAX_ARGS_DIRECT] _AL16;   // direct argument values
+
+} _AL16 gc_job_direct_args_t;
+
+
+// specifies direction for args passed in EA memory
+
+#define GCJD_DMA_GET           0x01            // in to SPE
+#define        GCJD_DMA_PUT            0x02            // out from SPE
+
+/*!
+ * \brief Description of args passed in EA memory.
+ * These are DMA'd between EA and LS as specified.
+ */
+typedef struct gc_job_ea_arg {
+  //! EA address of buffer
+  gc_eaddr_t     ea_addr;      
+
+  //! GC_JD_DMA_* get arg or put arg
+  uint32_t      direction;
+
+  //! number of bytes to get
+  uint32_t      get_size;         
+
+  //! number of bytes to put
+  uint32_t      put_size;
+
+#if defined(__SPU__)
+  //! local store address (filled in by SPU runtime)
+  void         *ls_addr;
+  uint32_t      _pad[2];
+#else
+  uint32_t       _pad[3];
+#endif
+
+} _AL16 gc_job_ea_arg_t;
+
+
+typedef struct gc_job_ea_args {
+  uint32_t             nargs;
+  gc_job_ea_arg_t      arg[MAX_ARGS_EA];
+
+} _AL16 gc_job_ea_args_t;
+
+
+/*!
+ * \brief "job description" that is DMA'd to/from the SPE.
+ */
+typedef struct gc_job_desc
+{
+  gc_job_desc_private_t sys;     // internals
+  gc_job_status_t      status;   // what happened (output)
+  gc_proc_id_t          proc_id;  // specifies which procedure to run
+  gc_job_direct_args_t input;    // direct args to SPE
+  gc_job_direct_args_t output;   // direct args from SPE
+  gc_job_ea_args_t     eaa;      // args passed via EA memory
+
+} _AL128 gc_job_desc_t;
+
+
+/*!
+ * type of procedure invoked on spu
+ */
+typedef void (*gc_spu_proc_t)(const gc_job_direct_args_t *input,
+                             gc_job_direct_args_t *output,
+                             const gc_job_ea_args_t *eaa);
+
+#if !defined(__SPU__)
+
+static inline gc_job_desc_t *
+ea_to_jdp(gc_eaddr_t ea)
+{
+  return (gc_job_desc_t *) ea_to_ptr(ea);
+}
+
+static inline gc_eaddr_t
+jdp_to_ea(gc_job_desc_t *item)
+{
+  return ptr_to_ea(item);
+}
+
+#endif
+
+
+__GC_END_DECLS
+
+#endif /* INCLUDED_GC_JOB_DESC_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc_private.h
 (from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_job_desc_private.h)
===================================================================
--- 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc_private.h
                         (rev 0)
+++ 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_job_desc_private.h
 2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,39 @@
+/* -*- c -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_JOB_DESC_PRIVATE_H
+#define INCLUDED_GC_JOB_DESC_PRIVATE_H
+
+// #include <libsync.h>
+
+/*!
+ * \brief Implementation details we'd like to hide from the user.
+ */
+typedef struct gc_job_desc_private
+{
+  gc_eaddr_t   next;               // used to implement job queue and free list
+  uint16_t     job_id;
+  uint16_t     client_id;
+  uint32_t     direction_union;    // union of all gc_job_ea_arg.direction 
fields
+} gc_job_desc_private_t;
+
+#endif /* INCLUDED_GC_JOB_PRIVATE_H */
+

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_logging.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_logging.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_logging.h  
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_logging.h  
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,166 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GC_LOGGING_H
+#define INCLUDED_GC_LOGGING_H
+
+#include <gc_types.h>
+#include <string.h>
+
+__GC_BEGIN_DECLS
+
+typedef struct gc_log {
+  gc_eaddr_t           base;           // gc_log_entry_t * (16 byte aligned)
+  uint32_t     nentries;       // number of entries (power-of-2)
+} gc_log_t;
+
+typedef struct gc_log_entry {
+  uint32_t     seqno;          // monotonic sequence number
+  uint32_t     timestamp;      // decrementer value (wraps every 53s on PS3)
+  uint16_t     subsystem;      // 0 to 255 reserved for system, user gets 256 
and up
+  uint16_t     event;
+  uint32_t     info[5];
+} _AL16 gc_log_entry_t;
+
+#define        GCL_SS_SYS      0       // lowest system reserved subsystem
+#define        GCL_SS_USER   256       // lowest user reserved subsystem
+
+
+/*
+ * The resulting log files can be displayed using using:
+ *
+ *  $ od -t x4 -w32 spu_log.00 | less
+ */
+
+
+#if defined(__SPU__)
+
+/*!
+ * System fills in seqno and timestamp.  User is responsible for the rest.
+ */
+
+void _gc_log_write(gc_log_entry_t entry);
+
+#ifdef ENABLE_GC_LOGGING
+#define gc_log_write(entry) _gc_log_write(entry)
+#else
+#define gc_log_write(entry) do { } while (0)
+#endif
+
+inline static void
+gc_log_write0(int subsystem, int event)
+{
+  gc_log_entry_t e;
+  e.subsystem = subsystem;
+  e.event = event;
+  e.info[0] = 0;
+  e.info[1] = 0;
+  e.info[2] = 0;
+  e.info[3] = 0;
+  e.info[4] = 0;
+  gc_log_write(e);
+}
+
+inline static void
+gc_log_write1(int subsystem, int event,
+             uint32_t info0)
+{
+  gc_log_entry_t e;
+  e.subsystem = subsystem;
+  e.event = event;
+  e.info[0] = info0;
+  e.info[1] = 0;
+  e.info[2] = 0;
+  e.info[3] = 0;
+  e.info[4] = 0;
+  gc_log_write(e);
+}
+
+inline static void
+gc_log_write2(int subsystem, int event,
+             uint32_t info0, uint32_t info1)
+{
+  gc_log_entry_t e;
+  e.subsystem = subsystem;
+  e.event = event;
+  e.info[0] = info0;
+  e.info[1] = info1;
+  e.info[2] = 0;
+  e.info[3] = 0;
+  e.info[4] = 0;
+  gc_log_write(e);
+}
+
+inline static void
+gc_log_write3(int subsystem, int event,
+             uint32_t info0, uint32_t info1, uint32_t info2)
+{
+  gc_log_entry_t e;
+  e.subsystem = subsystem;
+  e.event = event;
+  e.info[0] = info0;
+  e.info[1] = info1;
+  e.info[2] = info2;
+  e.info[3] = 0;
+  e.info[4] = 0;
+  gc_log_write(e);
+}
+
+inline static void
+gc_log_write4(int subsystem, int event,
+             uint32_t info0, uint32_t info1, uint32_t info2, uint32_t info3)
+{
+  gc_log_entry_t e;
+  e.subsystem = subsystem;
+  e.event = event;
+  e.info[0] = info0;
+  e.info[1] = info1;
+  e.info[2] = info2;
+  e.info[3] = info3;
+  e.info[4] = 0;
+  gc_log_write(e);
+}
+
+inline static void
+gc_log_write5(int subsystem, int event,
+             uint32_t info0, uint32_t info1, uint32_t info2, uint32_t info3, 
uint32_t info4)
+{
+  gc_log_entry_t e;
+  e.subsystem = subsystem;
+  e.event = event;
+  e.info[0] = info0;
+  e.info[1] = info1;
+  e.info[2] = info2;
+  e.info[3] = info3;
+  e.info[4] = info4;
+  gc_log_write(e);
+}
+
+/*!
+ * One time initialization called by system runtime
+ */
+void
+_gc_log_init(gc_log_t log_info);
+
+#endif
+
+__GC_END_DECLS
+
+#endif /* INCLUDED_GC_LOGGING_H */

Copied: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_mbox.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_mbox.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_mbox.h     
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_mbox.h     
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007,2008 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GC_MBOX_H
+#define INCLUDED_GC_MBOX_H
+
+/*
+ * The PPE and SPE exchange a few 32-bit messages via mailboxes.
+ * All have a 4 bit opcode in the high bits.
+ *
+ *      3                   2                   1
+ *    1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *   |  op   |                        arg                            |
+ *   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+#define MK_MBOX_MSG(cmd, args) ((((cmd) & 0xf) << 28) | ((args) & 0x0fffffff))
+#define MBOX_MSG_OP(msg)  (((msg) >> 28) & 0xf)
+#define        MBOX_MSG_ARG(msg) ((msg) & 0x0fffffff)
+
+// PPE to SPE (sent via SPE Read Inbound Mailbox)
+
+#define OP_EXIT                        0x0     // exit now
+#define        OP_GET_SPU_BUFSIZE      0x1 
+
+// SPE to PPE (sent via SPE Write Outbound Interrupt Mailbox)
+
+#define OP_JOBS_DONE           0x2     // arg is 0 or 1, indicating which
+                                       //   gc_completion_info_t contains the 
info
+#define        OP_SPU_BUFSIZE          0x3     // arg is max number of bytes
+
+
+#endif /* INCLUDED_GC_MBOX_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_spu_args.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_spu_args.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_spu_args.h 
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_spu_args.h 
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GC_SPU_ARGS_H
+#define INCLUDED_GC_SPU_ARGS_H
+
+#include <gc_types.h>
+#include <gc_logging.h>
+
+// args passed to SPE at initialization time
+
+typedef struct gc_spu_args {
+  gc_eaddr_t   queue;          // address of job queue (gc_jd_queue_t *)
+  gc_eaddr_t   comp_info[2];   // completion info (gc_comp_info_t *)
+  uint32_t     spu_idx;        // which spu we are: [0,nspus-1]
+  uint32_t     nspus;          // number of spus we're using
+  uint32_t     proc_def_ls_addr;  // LS addr of proc_def table
+  uint32_t     nproc_defs;        // number of proc_defs in table
+  gc_log_t     log;               // logging info
+} _AL16 gc_spu_args_t;
+
+
+#define        GC_CI_NJOBS     62      // makes gc_comp_info 1 cache line long
+
+/*!
+ * \brief Used to return info to PPE on which jobs are completed.
+ *
+ * When each SPE is initalized, it is passed EA pointers to two of
+ * these structures.  The SPE uses these to communicate which jobs
+ * that it has worked on are complete.  The SPE notifies the PPE by
+ * sending an OP_JOBS_DONE message (see gc_mbox.h) with an argument of
+ * 0 or 1, indicating which of the two comp_info's to examine.  The
+ * SPE sets the in_use flag to 1 before DMA'ing to the PPE.  When the
+ * PPE is done with the structure, it must clear the in_use field to
+ * let the SPE know it can begin using it again.
+ */
+typedef struct gc_comp_info {
+  uint16_t     in_use;         // set by SPE, cleared by PPE when it's finished
+  uint16_t     ncomplete;      // number of valid job_id's
+  uint16_t     job_id[GC_CI_NJOBS];    // job_id's of completed jobs
+} _AL128 gc_comp_info_t;
+
+#endif /* INCLUDED_GC_SPU_ARGS_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_types.h (from 
rev 9823, gnuradio/branches/developers/eb/gcell-wip/gcell/include/gc_types.h)
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_types.h    
                        (rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/gc_types.h    
2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,63 @@
+/* -*- c -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_GC_TYPES_H
+#define INCLUDED_GC_TYPES_H
+
+#include <stdint.h>
+#include <gc_cdefs.h>
+#include "compiler.h"
+
+__GC_BEGIN_DECLS
+
+#ifndef __cplusplus
+typedef int bool;
+#define true  1
+#define false 0
+#endif
+
+/*!
+ * \brief 64-bit integer type representing an effective address (EA)
+ *
+ * This type is always 64-bits, regardless of whether we're
+ * running in 32 or 64-bit mode.
+ */
+typedef uint64_t       gc_eaddr_t;
+
+#if !defined(__SPU__)
+static inline void *
+ea_to_ptr(gc_eaddr_t ea)
+{
+  // in 32-bit mode we're tossing the top 32-bits.
+  return (void *) (uintptr_t) ea;
+}
+
+static inline gc_eaddr_t
+ptr_to_ea(void *p)
+{
+  // two steps to avoid compiler warning in 32-bit mode.
+  return (gc_eaddr_t) (uintptr_t) p;
+}
+#endif
+
+__GC_END_DECLS
+
+#endif /* INCLUDED_GC_TYPES_H */

Copied: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/memory_barrier.h 
(from rev 9823, 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/memory_barrier.h)
===================================================================
--- 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/memory_barrier.h  
                            (rev 0)
+++ 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/memory_barrier.h  
    2008-10-22 17:50:44 UTC (rev 9825)
@@ -0,0 +1,66 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2007 Free Software Foundation, Inc.
+ * 
+ * This file is part of GNU Radio
+ * 
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ * 
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef INCLUDED_MEMORY_BARRIER_H
+#define INCLUDED_MEMORY_BARRIER_H
+
+/*
+ * powerpc memory barriers
+ *
+ * The sync instruction guarantees that all memory accesses initiated
+ * by this processor have been performed (with respect to all other
+ * mechanisms that access memory).  The eieio instruction is a barrier
+ * providing an ordering (separately) for (a) cacheable stores and (b)
+ * loads and stores to non-cacheable memory (e.g. I/O devices).
+ *
+ * smp_mb() prevents loads and stores being reordered across this point.
+ * smp_rmb() prevents loads being reordered across this point.
+ * smp_wmb() prevents stores being reordered across this point.
+ *
+ * We have to use the sync instructions for smp_mb(), since lwsync
+ * doesn't order loads with respect to previous stores.  Lwsync is
+ * fine for smp_rmb(), though.  For smp_wmb(), we use eieio since it
+ * is only used to order updates to system memory.
+ *
+ * For details, see "PowerPC Virtual Environment Architecture, Book
+ * II".  Especially Chapter 1, "Storage Model" and Chapter 3, "Storage
+ * Control Instructions." (site:ibm.com)
+ */
+
+#include <ppu_intrinsics.h>
+
+static inline void smp_mb(void)
+{
+  __sync();
+}
+
+static inline void smp_rmb(void)
+{
+  __lwsync();
+}
+
+static inline void smp_wmb(void)
+{
+  __eieio();
+}
+
+
+#endif /* INCLUDED_MEMORY_BARRIER_H */

Copied: gnuradio/branches/developers/eb/gcell-wip/gcell/include/gcell/spu (from 
rev 9823, gnuradio/branches/developers/eb/gcell-wip/gcell/include/spu)

Deleted: 
gnuradio/branches/developers/eb/gcell-wip/gcell/include/memory_barrier.h





reply via email to

[Prev in Thread] Current Thread [Next in Thread]