Panda3D
 All Classes Functions Variables Enumerations
genericThread.I
00001 // Filename: genericThread.I
00002 // Created by:  drose (09Nov11)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: GenericThread::set_function
00018 //       Access: Published
00019 //  Description: Replaces the function that is called when the thread
00020 //               runs.
00021 ////////////////////////////////////////////////////////////////////
00022 INLINE void GenericThread::
00023 set_function(GenericThread::ThreadFunc *function) {
00024   _function = function;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: GenericThread::get_function
00029 //       Access: Published
00030 //  Description: Returns the function that is called when the thread
00031 //               runs.
00032 ////////////////////////////////////////////////////////////////////
00033 INLINE GenericThread::ThreadFunc *GenericThread::
00034 get_function() const {
00035   return _function;
00036 }
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 //     Function: GenericThread::set_user_data
00040 //       Access: Published
00041 //  Description: Replaces the void pointer that is passed to the thread
00042 //               function.  This is any arbitrary pointer; the thread
00043 //               object does no processing on it.
00044 ////////////////////////////////////////////////////////////////////
00045 INLINE void GenericThread::
00046 set_user_data(void *user_data) {
00047   _user_data = user_data;
00048 }
00049 
00050 ////////////////////////////////////////////////////////////////////
00051 //     Function: GenericThread::get_user_data
00052 //       Access: Published
00053 //  Description: Returns the void pointer that is passed to the thread
00054 //               function.
00055 ////////////////////////////////////////////////////////////////////
00056 INLINE void *GenericThread::
00057 get_user_data() const {
00058   return _user_data;
00059 }
 All Classes Functions Variables Enumerations