Modify licenses
[scp/ocu/5gnr.git] / Include / vos_linklist.h
index 9c05436..7691b65 100644 (file)
@@ -1,9 +1,21 @@
 /******************************************************************************
-###############################################################################
-#   Copyright (c) [2017-2020] [ICT/CAS]                                        #
-#   Licensed under the ORAN Software License v1.0 (License)             #
-###############################################################################
-******************************************************************************/
+*
+*   Copyright (c) 2020 ICT/CAS.
+*
+*   Licensed under the O-RAN Software License, Version 1.0 (the "Software License");
+*   you may not use this file except in compliance with the License.
+*   You may obtain a copy of the License at
+*
+*       https://www.o-ran.org/software
+*
+*   Unless required by applicable law or agreed to in writing, software
+*   distributed under the License is distributed on an "AS IS" BASIS,
+*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+*   See the License for the specific language governing permissions and
+*   limitations under the License.
+*
+*******************************************************************************/
+
 
 
 
@@ -59,24 +71,24 @@ typedef struct cl_lib_list
 /** 获得节点中的数据 */
 #define cl_lib_getdata(X) ((X)->data)
 
-/** 
+/**
  * 创建一个linklist
  * @param[in]   name      list名  最大长度 LIST_NAME_LEN
  * @param[in]   moduleID  创建list的模块ID
  * @return      成功时返回新list地址,失败则返回NULL。
- */ 
+ */
 struct cl_lib_list *cl_lib_list_new (char *name,unsigned long moduleID);
 
 
 
-/** 
+/**
  * free并删除linklist中的所有节点,然后free该list
  * !!!注意,如果data也需要free,则需要实现list的del成员
  * @param[in]   plist1      要删除的list
  */
 void cl_lib_list_delete ( struct cl_lib_list * plist1 );
 
-/** 
+/**
  * 将数据添加到链表尾,直接传入要添加的数据,该API会自动创建节点
  * @param[in]   plist1      待添加的list
  * @param[in]   val         待添加的数据
@@ -84,21 +96,21 @@ void cl_lib_list_delete ( struct cl_lib_list * plist1 );
 void cl_lib_listnode_add ( struct cl_lib_list * plist1, void * val );
 
 
-/** 
+/**
  * 将数据添加到链表头,直接传入要添加的数据,该API会自动创建节点
  * @param[in]   plist1      待添加的list
  * @param[in]   val         待添加的数据
  */
 void cl_lib_listnode_add_toHead ( struct cl_lib_list * plist1, void * val );
 
-/** 
+/**
  * 删除数据等于val的节点,!!!不会free 数据
  * @param[in]   plist1      待删除的list
  * @param[in]   val         待删除的数据
  */
 void cl_lib_listnode_delete ( struct cl_lib_list * plist1, void * val );
 
-/** 
+/**
  * 根据注册的cmp函数删除节点,cmd 返回值为0 时删除,!!!不会free 数据
  * @param[in]   plist1      待删除的list
  * @param[in]   val         cmp 函数参数
@@ -106,7 +118,7 @@ void cl_lib_listnode_delete ( struct cl_lib_list * plist1, void * val );
  */
 void *cl_lib_listnode_cmp_delete ( struct cl_lib_list * plist1, void * val );
 
-/** 
+/**
  * 在当前节点前插入数据
  * @param[in]   plist1      待插入数据的list
  * @param[in]   currentnode 当前节点
@@ -114,7 +126,7 @@ void *cl_lib_listnode_cmp_delete ( struct cl_lib_list * plist1, void * val );
  */
 void cl_lib_list_add_node_prev ( plist plist1, plistnode currentnode, void *val );
 
-/** 
+/**
  * 在当前节点后插入数据
  * @param[in]   plist1      待插入数据的list
  * @param[in]   currentnode 当前节点
@@ -122,7 +134,7 @@ void cl_lib_list_add_node_prev ( plist plist1, plistnode currentnode, void *val
  */
 void cl_lib_list_add_node_next ( plist plist1, plistnode currentnode, void *val );
 
-/** 
+/**
  * 节点查找 API,根据给定val查找
  * !!!用此API 需要确保 plist->cmp 成员已赋值,否则无法查找
  * !!!不可修改获得节点的 prev 和 next指针
@@ -135,7 +147,7 @@ void cl_lib_list_add_node_next ( plist plist1, plistnode currentnode, void *val
 plistnode cl_lib_listnode_lookup_by_val( plist plist1, void *data );
 
 
-/** 
+/**
  * 节点查找 API,根据给定val和cmp方法查找
  * !!!不可修改获得节点的 prev 和 next指针
  * !!!不可释放获得节点
@@ -148,7 +160,7 @@ plistnode cl_lib_listnode_lookup_by_val( plist plist1, void *data );
 plistnode cl_lib_listnode_lookup_by_func( plist plist1, int (*cmp)(void *val1, void *val2),void *data);
 
 
-/** 
+/**
  * 查找到的节点,如果想要从链表中删除,必须使用该接口
  * !!!注意,如果data也需要free,则需要实现list的del成员
  * @param[in]   plist1      list