00001 /** @file 00002 00003 A brief file description 00004 00005 @section license License 00006 00007 Licensed to the Apache Software Foundation (ASF) under one 00008 or more contributor license agreements. See the NOTICE file 00009 distributed with this work for additional information 00010 regarding copyright ownership. The ASF licenses this file 00011 to you under the Apache License, Version 2.0 (the 00012 "License"); you may not use this file except in compliance 00013 with the License. You may obtain a copy of the License at 00014 00015 http://www.apache.org/licenses/LICENSE-2.0 00016 00017 Unless required by applicable law or agreed to in writing, software 00018 distributed under the License is distributed on an "AS IS" BASIS, 00019 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00020 See the License for the specific language governing permissions and 00021 limitations under the License. 00022 */ 00023 00024 #ifndef _P_UnixEvent_h_ 00025 #define _P_UnixEvent_h_ 00026 00027 TS_INLINE Event * 00028 Event::init(Continuation * c, ink_hrtime atimeout_at, ink_hrtime aperiod) 00029 { 00030 continuation = c; 00031 timeout_at = atimeout_at; 00032 period = aperiod; 00033 immediate = !period && !atimeout_at; 00034 cancelled = false; 00035 return this; 00036 } 00037 00038 TS_INLINE void 00039 Event::free() 00040 { 00041 mutex = NULL; 00042 eventAllocator.free(this); 00043 } 00044 00045 TS_INLINE 00046 Event::Event(): 00047 ethread(0), 00048 in_the_prot_queue(false), 00049 in_the_priority_queue(false), 00050 immediate(false), 00051 globally_allocated(true), 00052 in_heap(false), 00053 timeout_at(0), 00054 period(0) 00055 { 00056 } 00057 00058 #endif /*_UnixEvent_h_*/