*
* @author Daniel Sangorrin <daniel.sangorrin@unican.es>
*
+ * @license
+ *
+ * -----------------------------------------------------------------------
+ * Copyright (C) 2006 - 2008 FRESCOR consortium partners:
+ *
+ * Universidad de Cantabria, SPAIN
+ * University of York, UK
+ * Scuola Superiore Sant'Anna, ITALY
+ * Kaiserslautern University, GERMANY
+ * Univ. Politécnica Valencia, SPAIN
+ * Czech Technical University in Prague, CZECH REPUBLIC
+ * ENEA SWEDEN
+ * Thales Communication S.A. FRANCE
+ * Visual Tools S.A. SPAIN
+ * Rapita Systems Ltd UK
+ * Evidence ITALY
+ *
+ * See http://www.frescor.org for a link to partners' websites
+ *
+ * FRESCOR project (FP6/2005/IST/5-034026) is funded
+ * in part by the European Union Sixth Framework Programme
+ * The European Union is not liable of any use that may be
+ * made of this code.
+ *
+ * This file is part of FRESCAN
+ *
+ * FRESCAN 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 2, or (at your option)
+ * any later version.
+ *
+ * FRESCAN 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
+ * distributed with FRESCAN; see file COPYING. If not, write to the
+ * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * As a special exception, including FRESCAN header files in a file,
+ * instantiating FRESCAN generics or templates, or linking other files
+ * with FRESCAN objects to produce an executable application, does not
+ * by itself cause the resulting executable application to be covered
+ * by the GNU General Public License. This exception does not
+ * however invalidate any other reasons why the executable file might be
+ * covered by the GNU Public License.
+ * -----------------------------------------------------------------------
+ *
*/
#include <misc/freelist.h>
{
int err, pos;
- DEBUG(FRESCAN_REPLYOBJ_ENABLE_DEBUG,
+ DEBUG(FRESCAN_ROBJS_ENABLE_DEBUG,
"allocating reply object, is_initialized=%d\n", is_initialized);
if (is_initialized == false) return -1;
err = fosa_mutex_init(&the_reply_objects[pos].mutex, ceiling);
if (err != 0) return err;
- DEBUG(FRESCAN_REPLYOBJ_ENABLE_DEBUG,
+ DEBUG(FRESCAN_ROBJS_ENABLE_DEBUG,
"reply object allocated, id=%d\n", *id);
return 0;
{
int err;
- DEBUG(FRESCAN_REPLYOBJ_ENABLE_DEBUG,
+ DEBUG(FRESCAN_ROBJS_ENABLE_DEBUG,
"free reply id=%d, is_initialized=%d\n", id, is_initialized);
if (is_initialized == false) return -1;
{
int err;
- DEBUG(FRESCAN_REPLYOBJ_ENABLE_DEBUG,
+ DEBUG(FRESCAN_ROBJS_ENABLE_DEBUG,
"is_initialized=%d\n", is_initialized);
if (is_initialized == false) return -1;
- DEBUG(FRESCAN_REPLYOBJ_ENABLE_DEBUG,
+ DEBUG(FRESCAN_ROBJS_ENABLE_DEBUG,
"taking mutex of the reply id=%d\n", id);
err = fosa_mutex_lock(&the_reply_objects[id].mutex);
if (err != 0) return err;
the_reply_objects[id].is_work_done = true;
- DEBUG(FRESCAN_REPLYOBJ_ENABLE_DEBUG,
+ DEBUG(FRESCAN_ROBJS_ENABLE_DEBUG,
"signal the cond variable\n");
err = fosa_cond_signal(&the_reply_objects[id].cond);
if (err != 0) goto locked_error;
return 0;
locked_error:
- ERROR("locked error %d\n", err);
+ FRESCAN_ERROR("locked error %d\n", err);
fosa_mutex_unlock(&the_reply_objects[id].mutex);
return err;
}