Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
8dcce6f9
Commit
8dcce6f9
authored
Dec 18, 1998
by
Bob Halley
Browse files
change memctx to mem
parent
4cafb28a
Changes
11
Hide whitespace changes
Inline
Side-by-side
bin/tests/sock_test.c
View file @
8dcce6f9
...
...
@@ -37,7 +37,7 @@
#include <arpa/inet.h>
isc_mem
ctx
_t
*
mctx
=
NULL
;
isc_mem_t
*
mctx
=
NULL
;
int
sockets_active
=
0
;
static
void
my_send
(
isc_task_t
*
task
,
isc_event_t
*
event
);
...
...
@@ -272,7 +272,7 @@ main(int argc, char *argv[])
workers
=
2
;
printf
(
"%d workers
\n
"
,
workers
);
INSIST
(
isc_mem
ctx
_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_taskmgr_create
(
mctx
,
workers
,
0
,
&
manager
)
==
ISC_R_SUCCESS
);
...
...
@@ -390,7 +390,7 @@ main(int argc, char *argv[])
isc_taskmgr_destroy
(
&
manager
);
isc_mem_stats
(
mctx
,
stdout
);
isc_mem
ctx
_destroy
(
&
mctx
);
isc_mem_destroy
(
&
mctx
);
return
(
0
);
}
bin/tests/task_test.c
View file @
8dcce6f9
...
...
@@ -28,7 +28,7 @@
#include <isc/result.h>
#include <isc/timer.h>
isc_mem
ctx
_t
*
mctx
=
NULL
;
isc_mem_t
*
mctx
=
NULL
;
static
void
my_callback
(
isc_task_t
*
task
,
isc_event_t
*
event
)
...
...
@@ -78,7 +78,7 @@ main(int argc, char *argv[]) {
workers
=
2
;
printf
(
"%d workers
\n
"
,
workers
);
INSIST
(
isc_mem
ctx
_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_taskmgr_create
(
mctx
,
workers
,
0
,
&
manager
)
==
ISC_R_SUCCESS
);
...
...
@@ -173,5 +173,5 @@ main(int argc, char *argv[]) {
printf
(
"destroyed
\n
"
);
isc_mem_stats
(
mctx
,
stdout
);
isc_mem
ctx
_destroy
(
&
mctx
);
isc_mem_destroy
(
&
mctx
);
}
bin/tests/timer_test.c
View file @
8dcce6f9
...
...
@@ -28,7 +28,7 @@
#include <isc/result.h>
#include <isc/timer.h>
isc_mem
ctx
_t
*
mctx
=
NULL
;
isc_mem_t
*
mctx
=
NULL
;
isc_task_t
*
t1
,
*
t2
,
*
t3
;
isc_timer_t
*
ti1
,
*
ti2
,
*
ti3
;
int
tick_count
=
0
;
...
...
@@ -110,7 +110,7 @@ main(int argc, char *argv[]) {
workers
=
2
;
printf
(
"%d workers
\n
"
,
workers
);
INSIST
(
isc_mem
ctx
_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_mem_create
(
0
,
0
,
&
mctx
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_taskmgr_create
(
mctx
,
workers
,
0
,
&
manager
)
==
ISC_R_SUCCESS
);
INSIST
(
isc_timermgr_create
(
mctx
,
&
timgr
)
==
ISC_R_SUCCESS
);
...
...
@@ -158,5 +158,5 @@ main(int argc, char *argv[]) {
printf
(
"destroyed
\n
"
);
isc_mem_stats
(
mctx
,
stdout
);
isc_mem
ctx
_destroy
(
&
mctx
);
isc_mem_destroy
(
&
mctx
);
}
lib/isc/heap.c
View file @
8dcce6f9
...
...
@@ -49,7 +49,7 @@
struct
isc_heap
{
unsigned
int
magic
;
isc_mem
ctx
_t
*
mctx
;
isc_mem_t
*
mctx
;
unsigned
int
size
;
unsigned
int
size_increment
;
unsigned
int
last
;
...
...
@@ -59,7 +59,7 @@ struct isc_heap {
};
isc_result_t
isc_heap_create
(
isc_mem
ctx
_t
*
mctx
,
isc_heapcompare_t
compare
,
isc_heap_create
(
isc_mem_t
*
mctx
,
isc_heapcompare_t
compare
,
isc_heapindex_t
index
,
unsigned
int
size_increment
,
isc_heap_t
**
heapp
)
{
...
...
lib/isc/include/isc/heap.h
View file @
8dcce6f9
...
...
@@ -30,7 +30,7 @@ typedef void (*isc_heapaction_t)(void *, void *);
typedef
struct
isc_heap
isc_heap_t
;
isc_result_t
isc_heap_create
(
isc_mem
ctx
_t
*
,
isc_heapcompare_t
,
isc_result_t
isc_heap_create
(
isc_mem_t
*
,
isc_heapcompare_t
,
isc_heapindex_t
,
unsigned
int
,
isc_heap_t
**
);
void
isc_heap_destroy
(
isc_heap_t
**
);
isc_result_t
isc_heap_insert
(
isc_heap_t
*
,
void
*
);
...
...
lib/isc/include/isc/socket.h
View file @
8dcce6f9
...
...
@@ -538,7 +538,7 @@ isc_socket_sendmark(isc_socket_t *sock,
*/
isc_result_t
isc_socketmgr_create
(
isc_mem
ctx
_t
*
mctx
,
isc_socketmgr_t
**
managerp
);
isc_socketmgr_create
(
isc_mem_t
*
mctx
,
isc_socketmgr_t
**
managerp
);
/*
* Create a socket manager.
*
...
...
lib/isc/include/isc/task.h
View file @
8dcce6f9
...
...
@@ -54,7 +54,7 @@ typedef void (*isc_eventdestructor_t)(isc_event_t *);
* defining new event types.
*/
struct
isc_event
{
isc_mem
ctx
_t
*
mctx
;
isc_mem_t
*
mctx
;
size_t
size
;
void
*
sender
;
isc_eventtype_t
type
;
...
...
@@ -69,7 +69,7 @@ struct isc_event {
typedef
LIST
(
struct
isc_event
)
isc_eventlist_t
;
isc_event_t
*
isc_event_allocate
(
isc_mem
ctx
_t
*
,
isc_event_t
*
isc_event_allocate
(
isc_mem_t
*
,
void
*
,
isc_eventtype_t
,
isc_taskaction_t
,
...
...
@@ -104,7 +104,7 @@ void isc_task_destroy(isc_task_t **);
*** Task Manager.
***/
isc_result_t
isc_taskmgr_create
(
isc_mem
ctx
_t
*
,
isc_result_t
isc_taskmgr_create
(
isc_mem_t
*
,
unsigned
int
,
unsigned
int
,
isc_taskmgr_t
**
);
...
...
lib/isc/include/isc/timer.h
View file @
8dcce6f9
...
...
@@ -251,7 +251,7 @@ isc_timer_detach(isc_timer_t **timerp);
*/
isc_result_t
isc_timermgr_create
(
isc_mem
ctx
_t
*
mctx
,
isc_timermgr_t
**
managerp
);
isc_timermgr_create
(
isc_mem_t
*
mctx
,
isc_timermgr_t
**
managerp
);
/*
* Create a timer manager.
*
...
...
lib/isc/task.c
View file @
8dcce6f9
...
...
@@ -73,7 +73,7 @@ struct isc_task {
struct
isc_taskmgr
{
/* Not locked. */
unsigned
int
magic
;
isc_mem
ctx
_t
*
mctx
;
isc_mem_t
*
mctx
;
isc_mutex_t
lock
;
unsigned
int
workers
;
isc_thread_t
*
threads
;
...
...
@@ -94,7 +94,7 @@ struct isc_taskmgr {
***/
static
inline
isc_event_t
*
event_allocate
(
isc_mem
ctx
_t
*
mctx
,
void
*
sender
,
isc_eventtype_t
type
,
event_allocate
(
isc_mem_t
*
mctx
,
void
*
sender
,
isc_eventtype_t
type
,
isc_taskaction_t
action
,
void
*
arg
,
size_t
size
)
{
isc_event_t
*
event
;
...
...
@@ -115,7 +115,7 @@ event_allocate(isc_memctx_t *mctx, void *sender, isc_eventtype_t type,
}
isc_event_t
*
isc_event_allocate
(
isc_mem
ctx
_t
*
mctx
,
void
*
sender
,
isc_eventtype_t
type
,
isc_event_allocate
(
isc_mem_t
*
mctx
,
void
*
sender
,
isc_eventtype_t
type
,
isc_taskaction_t
action
,
void
*
arg
,
size_t
size
)
{
if
(
size
<
sizeof
(
struct
isc_event
))
...
...
@@ -703,7 +703,7 @@ manager_free(isc_taskmgr_t *manager) {
}
isc_result_t
isc_taskmgr_create
(
isc_mem
ctx
_t
*
mctx
,
unsigned
int
workers
,
isc_taskmgr_create
(
isc_mem_t
*
mctx
,
unsigned
int
workers
,
unsigned
int
default_quantum
,
isc_taskmgr_t
**
managerp
)
{
unsigned
int
i
,
started
=
0
;
...
...
lib/isc/timer.c
View file @
8dcce6f9
...
...
@@ -74,7 +74,7 @@ struct isc_timer {
struct
isc_timermgr
{
/* Not locked. */
unsigned
int
magic
;
isc_mem
ctx
_t
*
mctx
;
isc_mem_t
*
mctx
;
isc_mutex_t
lock
;
/* Locked by manager lock. */
isc_boolean_t
done
;
...
...
@@ -547,7 +547,7 @@ set_index(void *what, unsigned int index) {
}
isc_result_t
isc_timermgr_create
(
isc_mem
ctx
_t
*
mctx
,
isc_timermgr_t
**
managerp
)
{
isc_timermgr_create
(
isc_mem_t
*
mctx
,
isc_timermgr_t
**
managerp
)
{
isc_timermgr_t
*
manager
;
isc_result_t
result
;
...
...
lib/isc/unix/socket.c
View file @
8dcce6f9
...
...
@@ -137,7 +137,7 @@ struct isc_socket {
struct
isc_socketmgr
{
/* Not locked. */
unsigned
int
magic
;
isc_mem
ctx
_t
*
mctx
;
isc_mem_t
*
mctx
;
isc_mutex_t
lock
;
/* Locked by manager lock. */
unsigned
int
nsockets
;
/* sockets managed */
...
...
@@ -1436,7 +1436,7 @@ watcher(void *uap)
* Create a new socket manager.
*/
isc_result_t
isc_socketmgr_create
(
isc_mem
ctx
_t
*
mctx
,
isc_socketmgr_t
**
managerp
)
isc_socketmgr_create
(
isc_mem_t
*
mctx
,
isc_socketmgr_t
**
managerp
)
{
isc_socketmgr_t
*
manager
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment