eina hamster++

<dieb_> weird, undefined refernce to eina_cpu_count
<raster> you have no cpus!
<dieb_> dammit!
<Sachiel> try eina_hamster_count
<dieb_> lo
<raster> oh god
<raster> now u did it
<raster> i have to add that
<dieb_> heheheh



SVN revision: 41727
This commit is contained in:
Carsten Haitzler 2009-08-13 00:47:55 +00:00
parent 447051bf3c
commit d0c5158f5b
5 changed files with 131 additions and 2 deletions

View File

@ -166,6 +166,7 @@ extern "C" {
#include "eina_convert.h"
#include "eina_cpu.h"
#include "eina_tiler.h"
#include "eina_hamster.h"
#ifdef __cplusplus
}

View File

@ -33,7 +33,8 @@ eina_trash.h \
eina_iterator.h \
eina_main.h \
eina_cpu.h \
eina_tiler.h
eina_tiler.h \
eina_hamster.h
installed_mainheaderdir = $(includedir)/eina-@VMAJ@
dist_installed_mainheader_DATA = Eina.h eina_config.h

View File

@ -0,0 +1,44 @@
/* EINA - EFL data type library
* Copyright (C) 2008 Cedric Bail
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EINA_HAMSTER_H_
#define EINA_HAMSTER_H_
/**
* @addtogroup Eina_Core_Group Core
*
* @{
*/
/**
* @defgroup Eina_Main_Group Hamster
*
* @{
*/
EAPI int eina_hamster_count(void);
/**
* @}
*/
/**
* @}
*/
#endif /* EINA_HAMSTER_H_ */

View File

@ -32,7 +32,8 @@ eina_benchmark.c \
eina_rectangle.c \
eina_stringshare.c \
eina_cpu.c \
eina_tiler.c
eina_tiler.c \
eina_hamster.c
if EINA_STATIC_BUILD_CHAINED_POOL

View File

@ -0,0 +1,82 @@
/* EINA - EFL data type library
* Copyright (C) 2008 Cedric Bail
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "eina_types.h"
#include "eina_main.h"
#include "eina_error.h"
#include "eina_hash.h"
#include "eina_stringshare.h"
#include "eina_list.h"
#include "eina_array.h"
#include "eina_counter.h"
#include "eina_benchmark.h"
#include "eina_magic.h"
#include "eina_rectangle.h"
/*============================================================================*
* Local *
*============================================================================*/
/**
* @cond LOCAL
*/
static int _eina_hamsters = 7;
/**
* @endcond
*/
/*============================================================================*
* Global *
*============================================================================*/
/*============================================================================*
* API *
*============================================================================*/
/**
* @addtogroup Eina_Main_Group Hamster
*
* @brief These functions provide hamster calls.
*
* @{
*/
/**
* @brief Get the hamster count.
*
* @return The number of available hamsters.
*
* This function returns how many hamsters you have.
*/
EAPI int
eina_hamster_count(void)
{
return _eina_hamsters;
}
/**
* @}
*/