summaryrefslogtreecommitdiffstats
path: root/unix/tclKqueueNotfy.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-01 22:01:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-01 22:01:35 (GMT)
commitba417d3ce6d273a724c772efed9f3fbca65b94a8 (patch)
tree954bdbecb4cb9c3a063b6ad4b237f6c7a7c05ae1 /unix/tclKqueueNotfy.c
parente663097026638d349d2ac63a28f5c5fcd6f15677 (diff)
parent195f90c9510d639c9807253136edfce377cbeef9 (diff)
downloadtcl-ba417d3ce6d273a724c772efed9f3fbca65b94a8.zip
tcl-ba417d3ce6d273a724c772efed9f3fbca65b94a8.tar.gz
tcl-ba417d3ce6d273a724c772efed9f3fbca65b94a8.tar.bz2
Change ckalloc and friends to Tcl_Alloc and friends. Add two defines, TCL_IO_FAILURE and TCL_NO_LENGTH (experimental, still open to be renamed following discussion)
Diffstat (limited to 'unix/tclKqueueNotfy.c')
-rw-r--r--unix/tclKqueueNotfy.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index 6d685ad..bea1b30 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -214,7 +214,7 @@ PlatformEventsControl(
struct stat fdStat;
if (isNew) {
- newPedPtr = ckalloc(sizeof(*newPedPtr));
+ newPedPtr = Tcl_Alloc(sizeof(*newPedPtr));
newPedPtr->filePtr = filePtr;
newPedPtr->tsdPtr = tsdPtr;
filePtr->pedPtr = newPedPtr;
@@ -332,7 +332,7 @@ PlatformEventsFinalize(
tsdPtr->eventsFd = 0;
}
if (tsdPtr->readyEvents) {
- ckfree(tsdPtr->readyEvents);
+ Tcl_Free(tsdPtr->readyEvents);
tsdPtr->maxReadyEvents = 0;
}
pthread_mutex_unlock(&tsdPtr->notifierMutex);
@@ -398,13 +398,13 @@ PlatformEventsInit(
} else if (fcntl(tsdPtr->eventsFd, F_SETFD, FD_CLOEXEC) == -1) {
Tcl_Panic("fcntl: %s", strerror(errno));
}
- filePtr = ckalloc(sizeof(*filePtr));
+ filePtr = Tcl_Alloc(sizeof(*filePtr));
filePtr->fd = tsdPtr->triggerPipe[0];
filePtr->mask = TCL_READABLE;
PlatformEventsControl(filePtr, tsdPtr, EV_ADD, 1);
if (!tsdPtr->readyEvents) {
tsdPtr->maxReadyEvents = 512;
- tsdPtr->readyEvents = ckalloc(tsdPtr->maxReadyEvents
+ tsdPtr->readyEvents = Tcl_Alloc(tsdPtr->maxReadyEvents
* sizeof(tsdPtr->readyEvents[0]));
}
LIST_INIT(&tsdPtr->firstReadyFileHandlerPtr);
@@ -568,7 +568,7 @@ Tcl_CreateFileHandler(
}
}
if (filePtr == NULL) {
- filePtr = ckalloc(sizeof(FileHandler));
+ filePtr = Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = fd;
filePtr->readyMask = 0;
filePtr->nextPtr = tsdPtr->firstFileHandlerPtr;
@@ -637,7 +637,7 @@ Tcl_DeleteFileHandler(
PlatformEventsControl(filePtr, tsdPtr, EV_DELETE, 0);
if (filePtr->pedPtr) {
- ckfree(filePtr->pedPtr);
+ Tcl_Free(filePtr->pedPtr);
}
/*
@@ -649,7 +649,7 @@ Tcl_DeleteFileHandler(
} else {
prevPtr->nextPtr = filePtr->nextPtr;
}
- ckfree(filePtr);
+ Tcl_Free(filePtr);
}
}
@@ -754,7 +754,7 @@ Tcl_WaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr =
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
@@ -817,7 +817,7 @@ Tcl_WaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr =
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;