summaryrefslogtreecommitdiff
path: root/gcell/src/include/spu
diff options
context:
space:
mode:
authoreb2008-06-19 00:06:42 +0000
committereb2008-06-19 00:06:42 +0000
commitdf0ae475f782814c95d4f9be166aaffbcc7d47b1 (patch)
treecd7076e4a5fb524b393e8ad9d9a5ef29e7a8e5da /gcell/src/include/spu
parenta22202008689a4a893c29af118febf5c57cb8103 (diff)
downloadgnuradio-df0ae475f782814c95d4f9be166aaffbcc7d47b1.tar.gz
gnuradio-df0ae475f782814c95d4f9be166aaffbcc7d47b1.tar.bz2
gnuradio-df0ae475f782814c95d4f9be166aaffbcc7d47b1.zip
Merged eb/gcell-wip -r8559:8571 into trunk. The shared queue
structure is slightly modified, and the spu dequeue has been streamlined. In addition, the spu Lost-Lock Line Reservation event is now work correctly, though it is still disabled because it's slower than the expontial backoff alternative. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8618 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gcell/src/include/spu')
-rw-r--r--gcell/src/include/spu/Makefile.am3
-rw-r--r--gcell/src/include/spu/gc_jd_queue.h12
-rw-r--r--gcell/src/include/spu/gc_random.h32
3 files changed, 37 insertions, 10 deletions
diff --git a/gcell/src/include/spu/Makefile.am b/gcell/src/include/spu/Makefile.am
index d202336f7..81a8bfdf4 100644
--- a/gcell/src/include/spu/Makefile.am
+++ b/gcell/src/include/spu/Makefile.am
@@ -22,4 +22,5 @@ include $(top_srcdir)/Makefile.common
gcellspuinclude_HEADERS = \
gc_delay.h \
- gc_jd_queue.h
+ gc_jd_queue.h \
+ gc_random.h
diff --git a/gcell/src/include/spu/gc_jd_queue.h b/gcell/src/include/spu/gc_jd_queue.h
index 7a6ac2e21..b65b15feb 100644
--- a/gcell/src/include/spu/gc_jd_queue.h
+++ b/gcell/src/include/spu/gc_jd_queue.h
@@ -39,20 +39,14 @@ __GC_BEGIN_DECLS
* \param[out] item is local store copy of item at head of queue.
* \returns false if the queue is empty, otherwise returns true
* and sets \p item_ea and DMA's job descriptor into \p item
+ *
+ * If return is false, we're holding a lock-line reservation that
+ * covers the queue.
*/
bool
gc_jd_queue_dequeue(gc_eaddr_t q, gc_eaddr_t *item_ea,
int jd_tag, gc_job_desc_t *item);
-
-/*!
- * \brief Get a line reservation on the queue
- *
- * \param[in] q is EA address of queue structure.
- */
-void
-gc_jd_queue_getllar(gc_eaddr_t q);
-
__GC_END_DECLS
diff --git a/gcell/src/include/spu/gc_random.h b/gcell/src/include/spu/gc_random.h
new file mode 100644
index 000000000..ccb564731
--- /dev/null
+++ b/gcell/src/include/spu/gc_random.h
@@ -0,0 +1,32 @@
+/* -*- 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_RANDOM_H
+#define INCLUDED_GC_RANDOM_H
+
+/*!
+ * \brief Return a uniformly distributed value in the range [0, 1.0)
+ * (Linear congruential generator. YMMV. Caveat emptor.)
+ */
+
+float gc_uniform_deviate(void);
+void gc_set_seed(int seed);
+
+#endif /* INCLUDED_GC_RANDOM_H */