update copyright date to 2013
[dpdk.git] / lib / librte_eal / common / include / rte_lcore.h
index f9308c4..478d7c8 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without 
@@ -30,7 +30,6 @@
  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * 
- *  version: DPDK.L.1.2.3-3
  */
 
 #ifndef _RTE_LCORE_H_
@@ -93,15 +92,17 @@ rte_lcore_count(void)
 
 #include <exec-env/rte_lcore.h>
 
-#ifdef __DOXYGEN__
 /**
  * Return the ID of the physical socket of the logical core we are
  * running on.
  * @return
- *   Socket ID
+ *   the ID of current lcoreid's physical socket
  */
 static inline unsigned
-rte_socket_id(void);
+rte_socket_id(void)
+{
+       return lcore_config[rte_lcore_id()].socket_id;
+}
 
 /**
  * Get the ID of the physical socket of the specified lcore
@@ -112,10 +113,10 @@ rte_socket_id(void);
  *   the ID of lcoreid's physical socket
  */
 static inline unsigned
-rte_lcore_to_socket_id(unsigned lcore_id);
-
-#endif
-
+rte_lcore_to_socket_id(unsigned lcore_id)
+{
+       return lcore_config[lcore_id].socket_id;
+}
 
 /**
  * Test if an lcore is enabled.