/* -*- c++ -*- */
/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
+ * Copyright 2007,2008,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
typedef char* optval_t;
#endif
+#include <gruel/thread.h>
+
#define SNK_VERBOSE 0
gr_udp_sink::gr_udp_sink (size_t itemsize,
bool
gr_udp_sink::open()
{
- omni_mutex_lock l(d_mutex); // hold mutex for duration of this function
+ gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
// create socket
if((d_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
void
gr_udp_sink::close()
{
- omni_mutex_lock l(d_mutex); // hold mutex for duration of this function
+ gruel::scoped_lock guard(d_mutex); // hold mutex for duration of this function
if (d_socket){
shutdown(d_socket, SHUT_RDWR);