diff options
Diffstat (limited to 'gcell/src/include/spu')
-rw-r--r-- | gcell/src/include/spu/Makefile.am | 3 | ||||
-rw-r--r-- | gcell/src/include/spu/gc_jd_queue.h | 12 | ||||
-rw-r--r-- | gcell/src/include/spu/gc_random.h | 32 |
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 */ |