/*++
"This software program is available to you under a choice of one of two
licenses.  You may choose to be licensed under either the GNU General Public
License (GPL) Version 2, June 1991, available at
http://www.fsf.org/copyleft/gpl.html, or the Intel BSD + Patent License,
the text of which follows:

"Recipient" has requested a license and Intel Corporation ("Intel") is willing
to grant a license for the software entitled InfiniBand(tm) System Software
(the "Software") being provided by Intel Corporation.

The following definitions apply to this License:

"Licensed Patents" means patent claims licensable by Intel Corporation which
are necessarily infringed by the use or sale of the Software alone or when
combined with the operating system referred to below.

"Recipient" means the party to whom Intel delivers this Software.
"Licensee" means Recipient and those third parties that receive a license to
any operating system available under the GNU Public License version 2.0 or
later.

Copyright (c) 1996-2003 Intel Corporation. All rights reserved.

The license is provided to Recipient and Recipient's Licensees under the
following terms.

Redistribution and use in source and binary forms of the Software, with or
without modification, are permitted provided that the following conditions are
met:
Redistributions of source code of the Software may retain the above copyright
notice, this list of conditions and the following disclaimer.

Redistributions in binary form of the Software may reproduce the above
copyright notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

Neither the name of Intel Corporation nor the names of its contributors shall
be used to endorse or promote products derived from this Software without
specific prior written permission.

Intel hereby grants Recipient and Licensees a non-exclusive, worldwide,
royalty-free patent license under Licensed Patents to make, use, sell, offer
to sell, import and otherwise transfer the Software, if any, in source code
and object code form. This license shall include changes to the Software that
are error corrections or other minor changes to the Software that do not add
functionality or features when the Software is incorporated in any version of
a operating system that has been distributed under the GNU General Public
License 2.0 or later.  This patent license shall apply to the combination of
the Software and any operating system licensed under the GNU Public License
version 2.0 or later if, at the time Intel provides the Software to Recipient,
such addition of the Software to the then publicly available versions of such
operating system available under the GNU Public License version 2.0 or later
(whether in gold, beta or alpha form) causes such combination to be covered by
the Licensed Patents. The patent license shall not apply to any other
combinations which include the Software. No hardware per se is licensed
hereunder.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
--*/

/*
 * Abstract:
 *	Export declarations for symbols.
 *
 * Environment:
 *	Linux Kernel Mode
 *
 * $Revision: 1.1 $
 */

#include <complib/comp_lib.h>
#include <linux/module.h>
#include <complib/cl_waitobj.h>

/* since these header are "Linux only" include them here */

/* Composite Pool */
EXPORT_SYMBOL(cl_cpool_construct);
EXPORT_SYMBOL(cl_cpool_init);

/* Grow Pool */
EXPORT_SYMBOL(cl_pool_construct);
EXPORT_SYMBOL(cl_pool_init);

/* Events */
EXPORT_SYMBOL(cl_event_construct);
EXPORT_SYMBOL(cl_event_init);
EXPORT_SYMBOL(cl_event_destroy);
EXPORT_SYMBOL(cl_event_signal);
EXPORT_SYMBOL(cl_event_reset);
EXPORT_SYMBOL(cl_event_wait_on);

/* Wait Objects */
EXPORT_SYMBOL(cl_create_wait_object);
EXPORT_SYMBOL(cl_signal_wait_object);
EXPORT_SYMBOL(cl_wait_on_wait_object);
EXPORT_SYMBOL(cl_destroy_wait_object);
EXPORT_SYMBOL(cl_get_kernel_wait_object);

/* Map */
EXPORT_SYMBOL(cl_map_construct);
EXPORT_SYMBOL(cl_map_init);
EXPORT_SYMBOL(cl_map_destroy);
EXPORT_SYMBOL(cl_map_insert);
EXPORT_SYMBOL(cl_map_get);
EXPORT_SYMBOL(cl_map_remove_item);
EXPORT_SYMBOL(cl_map_remove);
EXPORT_SYMBOL(cl_map_remove_all);

/* Memory */
EXPORT_SYMBOL(__cl_malloc_trk);
EXPORT_SYMBOL(__cl_malloc_ntrk);
EXPORT_SYMBOL(__cl_zalloc_trk);
EXPORT_SYMBOL(__cl_zalloc_ntrk);
EXPORT_SYMBOL(__cl_free_trk);
EXPORT_SYMBOL(__cl_free_ntrk);
EXPORT_SYMBOL(cl_memcmp);
EXPORT_SYMBOL(cl_memcpy);
EXPORT_SYMBOL(cl_memset);

/* Convert kernel vaddr->phyaddr */
EXPORT_SYMBOL(cl_get_physaddr);

/* Memory Tracking */
EXPORT_SYMBOL(cl_mem_display);

/* Timer */
EXPORT_SYMBOL(cl_timer_construct);
EXPORT_SYMBOL(cl_timer_init);
EXPORT_SYMBOL(cl_timer_destroy);
EXPORT_SYMBOL(cl_timer_start);
EXPORT_SYMBOL(cl_timer_trim);
EXPORT_SYMBOL(cl_timer_stop);
EXPORT_SYMBOL(cl_get_time_stamp);
EXPORT_SYMBOL(cl_get_time_stamp_sec);

/* Thread */
EXPORT_SYMBOL(cl_thread_construct);
EXPORT_SYMBOL(cl_thread_init);
EXPORT_SYMBOL(cl_thread_destroy);
EXPORT_SYMBOL(cl_thread_stall);
EXPORT_SYMBOL(cl_thread_suspend);
EXPORT_SYMBOL(cl_is_current_thread);

/* Thread Pool */
EXPORT_SYMBOL(cl_thread_pool_construct);
EXPORT_SYMBOL(cl_thread_pool_init);
EXPORT_SYMBOL(cl_thread_pool_destroy);
EXPORT_SYMBOL(cl_thread_pool_signal);

/* List */
EXPORT_SYMBOL(cl_list_construct);
EXPORT_SYMBOL(cl_list_init);
EXPORT_SYMBOL(cl_list_destroy);
EXPORT_SYMBOL(cl_list_insert_array_head);
EXPORT_SYMBOL(cl_list_insert_array_tail);
EXPORT_SYMBOL(cl_list_remove_object);
EXPORT_SYMBOL(cl_list_apply_func);
EXPORT_SYMBOL(cl_list_find_from_head);
EXPORT_SYMBOL(cl_list_find_from_tail);
EXPORT_SYMBOL(cl_is_object_in_list);

/* Log Provider */
EXPORT_SYMBOL(cl_log_event);

/*
 * Performance Counters
 *
 * The performance counter functions are always exported, allowing clients
 * to enable or disable the counter functionality via the macros defined
 * in cl_perf.h.
 */
EXPORT_SYMBOL(__cl_perf_construct);
EXPORT_SYMBOL(__cl_perf_init);
EXPORT_SYMBOL(__cl_perf_destroy);
EXPORT_SYMBOL(__cl_perf_display);

/* Processor Count */
EXPORT_SYMBOL(cl_proc_count);

/* Quick Composite Pool */
EXPORT_SYMBOL(cl_qcpool_construct);
EXPORT_SYMBOL(cl_qcpool_init);
EXPORT_SYMBOL(cl_qcpool_destroy);
EXPORT_SYMBOL(cl_qcpool_get);
EXPORT_SYMBOL(cl_qcpool_grow);

/* Quick Grow Pool */
EXPORT_SYMBOL(cl_qpool_construct);
EXPORT_SYMBOL(cl_qpool_init);

/* Quick List */
EXPORT_SYMBOL(cl_qlist_insert_array_head);
EXPORT_SYMBOL(cl_qlist_insert_array_tail);
EXPORT_SYMBOL(cl_qlist_insert_list_head);
EXPORT_SYMBOL(cl_qlist_insert_list_tail);
EXPORT_SYMBOL(cl_is_item_in_qlist);
EXPORT_SYMBOL(cl_qlist_apply_func);
EXPORT_SYMBOL(cl_qlist_find_next);
EXPORT_SYMBOL(cl_qlist_find_prev);
EXPORT_SYMBOL(cl_qlist_move_items);

/* Quick Map */
EXPORT_SYMBOL(cl_qmap_init);
EXPORT_SYMBOL(cl_qmap_insert);
EXPORT_SYMBOL(cl_qmap_get);
EXPORT_SYMBOL(cl_qmap_remove_item);
EXPORT_SYMBOL(cl_qmap_remove);
EXPORT_SYMBOL(cl_qmap_apply_func);

/* Flexi Map */
EXPORT_SYMBOL(cl_fmap_init);
EXPORT_SYMBOL(cl_fmap_insert);
EXPORT_SYMBOL(cl_fmap_get);
EXPORT_SYMBOL(cl_fmap_remove_item);
EXPORT_SYMBOL(cl_fmap_remove);

/* Request Manager */
EXPORT_SYMBOL(cl_req_mgr_destroy);
EXPORT_SYMBOL(cl_req_mgr_get);
EXPORT_SYMBOL(cl_req_mgr_init);
EXPORT_SYMBOL(cl_req_mgr_construct);
EXPORT_SYMBOL(cl_req_mgr_resume);

/* Spinlock */
EXPORT_SYMBOL(cl_spinlock_acquire);
EXPORT_SYMBOL(cl_spinlock_acquire_irq);
EXPORT_SYMBOL(cl_spinlock_destroy);
EXPORT_SYMBOL(cl_spinlock_init);
EXPORT_SYMBOL(cl_spinlock_construct);
EXPORT_SYMBOL(cl_spinlock_release);
EXPORT_SYMBOL(cl_spinlock_release_irq);

EXPORT_SYMBOL(cl_mutex_acquire);
EXPORT_SYMBOL(cl_mutex_destroy);
EXPORT_SYMBOL(cl_mutex_init);
EXPORT_SYMBOL(cl_mutex_construct);
EXPORT_SYMBOL(cl_mutex_release);

/* System Callback */
EXPORT_SYMBOL(cl_sys_callback_get);
EXPORT_SYMBOL(cl_sys_callback_put);
EXPORT_SYMBOL(cl_sys_callback_queue);

/* Vector */
EXPORT_SYMBOL(cl_vector_construct);
EXPORT_SYMBOL(cl_vector_init);
EXPORT_SYMBOL(cl_vector_destroy);
EXPORT_SYMBOL(cl_vector_at);
EXPORT_SYMBOL(cl_vector_set);
EXPORT_SYMBOL(cl_vector_set_capacity);
EXPORT_SYMBOL(cl_vector_set_size);
EXPORT_SYMBOL(cl_vector_set_min_size);
EXPORT_SYMBOL(cl_vector_apply_func);
EXPORT_SYMBOL(cl_vector_find_from_end);
EXPORT_SYMBOL(cl_vector_find_from_start);

/* Device Framework */
#include <complib/cl_device.h>
EXPORT_SYMBOL(cl_dev_create);
EXPORT_SYMBOL(cl_dev_destroy);
EXPORT_SYMBOL(cl_complete_io);
EXPORT_SYMBOL(cl_get_open_context);

/* User Mode Helper */
#include <complib/cl_system.h>
EXPORT_SYMBOL(cl_user_mode_helper);

/* Asynchronous Processor */
EXPORT_SYMBOL(cl_async_proc_construct);
EXPORT_SYMBOL(cl_async_proc_init);
EXPORT_SYMBOL(cl_async_proc_destroy);
EXPORT_SYMBOL(cl_async_proc_queue);

/* Pointer Vector */
EXPORT_SYMBOL(cl_ptr_vector_construct);
EXPORT_SYMBOL(cl_ptr_vector_init);
EXPORT_SYMBOL(cl_ptr_vector_destroy);
EXPORT_SYMBOL(cl_ptr_vector_at);
EXPORT_SYMBOL(cl_ptr_vector_set);
EXPORT_SYMBOL(cl_ptr_vector_remove);
EXPORT_SYMBOL(cl_ptr_vector_set_capacity);
EXPORT_SYMBOL(cl_ptr_vector_set_size);
EXPORT_SYMBOL(cl_ptr_vector_set_min_size);
EXPORT_SYMBOL(cl_ptr_vector_apply_func);
EXPORT_SYMBOL(cl_ptr_vector_find_from_start);
EXPORT_SYMBOL(cl_ptr_vector_find_from_end);

/* Text representation of cl_status_t */
EXPORT_SYMBOL(cl_status_text);

/* Object Management */
EXPORT_SYMBOL(cl_obj_mgr_create);
EXPORT_SYMBOL(cl_obj_mgr_destroy);
EXPORT_SYMBOL(cl_obj_construct);
EXPORT_SYMBOL(cl_obj_init);
EXPORT_SYMBOL(cl_obj_destroy);
EXPORT_SYMBOL(cl_obj_free);
EXPORT_SYMBOL(cl_obj_reset);
EXPORT_SYMBOL(cl_obj_ref);
EXPORT_SYMBOL(cl_obj_deref);
EXPORT_SYMBOL(cl_rel_alloc);
EXPORT_SYMBOL(cl_rel_free);
EXPORT_SYMBOL(cl_obj_insert_rel);
EXPORT_SYMBOL(cl_obj_remove_rel);
