3
Public RecMutex declarations
5
@section license License
7
Licensed to the Apache Software Foundation (ASF) under one
8
or more contributor license agreements. See the NOTICE file
9
distributed with this work for additional information
10
regarding copyright ownership. The ASF licenses this file
11
to you under the Apache License, Version 2.0 (the
12
"License"); you may not use this file except in compliance
13
with the License. You may obtain a copy of the License at
15
http://www.apache.org/licenses/LICENSE-2.0
17
Unless required by applicable law or agreed to in writing, software
18
distributed under the License is distributed on an "AS IS" BASIS,
19
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
See the License for the specific language governing permissions and
21
limitations under the License.
24
#ifndef _I_REC_MUTEX_H_
25
#define _I_REC_MUTEX_H_
27
#include "ink_mutex.h"
28
#include "ink_thread.h"
31
A wrapper to ink_mutex class. It allows multiple acquire of mutex lock
32
by the SAME thread. This is a trimmed down version of ProxyMutex.
37
size_t nthread_holding;
38
ink_thread thread_holding;
42
int rec_mutex_init(RecMutex * m, const char *name = NULL);
43
int rec_mutex_acquire(RecMutex * m);
44
int rec_mutex_release(RecMutex * m);