Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2764)

Unified Diff: c/lock.c

Issue 2842333002: Updated netty-tcnative to version 2.0.0.Final (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « c/jnilib.c ('k') | c/misc.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: c/lock.c
diff --git a/c/lock.c b/c/lock.c
deleted file mode 100644
index c574d961722fbb16c19d4b78f3ee089891dd4817..0000000000000000000000000000000000000000
--- a/c/lock.c
+++ /dev/null
@@ -1,202 +0,0 @@
-/* Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- */
-
-/*
- *
- * @author Mladen Turk
- * @version $Id: lock.c 1442587 2013-02-05 13:49:48Z rjung $
- */
-
-#include "tcn.h"
-#include "apr_proc_mutex.h"
-#include "apr_global_mutex.h"
-
-TCN_IMPLEMENT_CALL(jlong, Lock, create)(TCN_STDARGS,
- jstring fname,
- jint mech, jlong pool)
-{
- apr_pool_t *p = J2P(pool, apr_pool_t *);
- apr_proc_mutex_t *mutex;
- TCN_ALLOC_CSTRING(fname);
-
-
- UNREFERENCED(o);
- TCN_THROW_IF_ERR(apr_proc_mutex_create(&mutex, J2S(fname),
- (apr_lockmech_e)mech, p), mutex);
-
-cleanup:
- TCN_FREE_CSTRING(fname);
- return P2J(mutex);
-}
-
-TCN_IMPLEMENT_CALL(jlong, Lock, childInit)(TCN_STDARGS,
- jstring fname,
- jlong pool)
-{
- apr_pool_t *p = J2P(pool, apr_pool_t *);
- apr_proc_mutex_t *mutex;
- TCN_ALLOC_CSTRING(fname);
-
-
- UNREFERENCED(o);
- TCN_THROW_IF_ERR(apr_proc_mutex_child_init(&mutex,
- J2S(fname), p), mutex);
-
-cleanup:
- TCN_FREE_CSTRING(fname);
- return P2J(mutex);
-}
-
-TCN_IMPLEMENT_CALL(jint, Lock, lock)(TCN_STDARGS, jlong mutex)
-{
- apr_proc_mutex_t *m = J2P(mutex, apr_proc_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_proc_mutex_lock(m);
-}
-
-TCN_IMPLEMENT_CALL(jint, Lock, trylock)(TCN_STDARGS, jlong mutex)
-{
- apr_proc_mutex_t *m = J2P(mutex, apr_proc_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_proc_mutex_trylock(m);
-}
-
-TCN_IMPLEMENT_CALL(jint, Lock, unlock)(TCN_STDARGS, jlong mutex)
-{
- apr_proc_mutex_t *m = J2P(mutex, apr_proc_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_proc_mutex_unlock(m);
-}
-
-TCN_IMPLEMENT_CALL(jint, Lock, destroy)(TCN_STDARGS, jlong mutex)
-{
- apr_proc_mutex_t *m = J2P(mutex, apr_proc_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_proc_mutex_destroy(m);
-}
-
-#if 0
-/* There is bug in APR implementing that function */
-TCN_IMPLEMENT_CALL(jint, Lock, cleanup)(TCN_STDARGS, jlong mutex)
-{
- void *m = J2P(mutex, void *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_proc_mutex_cleanup(m);
-}
-#endif
-
-TCN_IMPLEMENT_CALL(jstring, Lock, lockfile)(TCN_STDARGS, jlong mutex)
-{
- apr_proc_mutex_t *m = J2P(mutex, apr_proc_mutex_t *);
- const char *s = apr_proc_mutex_lockfile(m);
-
- UNREFERENCED_STDARGS;
- if (s)
- return AJP_TO_JSTRING(s);
- else
- return NULL;
-}
-
-TCN_IMPLEMENT_CALL(jstring, Lock, name)(TCN_STDARGS, jlong mutex)
-{
- apr_proc_mutex_t *m = J2P(mutex, apr_proc_mutex_t *);
-
- UNREFERENCED(o);
- return AJP_TO_JSTRING(apr_proc_mutex_name(m));
-}
-
-TCN_IMPLEMENT_CALL(jstring, Lock, defname)(TCN_STDARGS)
-{
-
- UNREFERENCED(o);
- return AJP_TO_JSTRING(apr_proc_mutex_defname());
-}
-
-
-
-TCN_IMPLEMENT_CALL(jlong, Global, create)(TCN_STDARGS,
- jstring fname,
- jint mech, jlong pool)
-{
- apr_pool_t *p = J2P(pool, apr_pool_t *);
- apr_global_mutex_t *mutex;
- TCN_ALLOC_CSTRING(fname);
-
-
- UNREFERENCED(o);
- TCN_THROW_IF_ERR(apr_global_mutex_create(&mutex, J2S(fname),
- (apr_lockmech_e)mech, p), mutex);
-
-cleanup:
- TCN_FREE_CSTRING(fname);
- return P2J(mutex);
-}
-
-TCN_IMPLEMENT_CALL(jlong, Global, childInit)(TCN_STDARGS,
- jstring fname,
- jlong pool)
-{
- apr_pool_t *p = J2P(pool, apr_pool_t *);
- apr_global_mutex_t *mutex;
- TCN_ALLOC_CSTRING(fname);
-
-
- UNREFERENCED(o);
- TCN_THROW_IF_ERR(apr_global_mutex_child_init(&mutex,
- J2S(fname), p), mutex);
-
-cleanup:
- TCN_FREE_CSTRING(fname);
- return P2J(mutex);
-}
-
-TCN_IMPLEMENT_CALL(jint, Global, lock)(TCN_STDARGS, jlong mutex)
-{
- apr_global_mutex_t *m = J2P(mutex, apr_global_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_global_mutex_lock(m);
-}
-
-TCN_IMPLEMENT_CALL(jint, Global, trylock)(TCN_STDARGS, jlong mutex)
-{
- apr_global_mutex_t *m = J2P(mutex, apr_global_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_global_mutex_trylock(m);
-}
-
-TCN_IMPLEMENT_CALL(jint, Global, unlock)(TCN_STDARGS, jlong mutex)
-{
- apr_global_mutex_t *m = J2P(mutex, apr_global_mutex_t*);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_global_mutex_unlock(m);
-}
-
-TCN_IMPLEMENT_CALL(jint, Global, destroy)(TCN_STDARGS, jlong mutex)
-{
- apr_global_mutex_t *m = J2P(mutex, apr_global_mutex_t *);
-
- UNREFERENCED_STDARGS;
- return (jint)apr_global_mutex_destroy(m);
-}
-
« no previous file with comments | « c/jnilib.c ('k') | c/misc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698