Skip to content

Commit 60f4618

Browse files
committed
procfs: ipc performance improvements
1 parent c3a43c7 commit 60f4618

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

fs/procfs/src/io.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ void procfsOpen(OpenCommand *ocmd) {
2222
int res = resolve(ocmd->path, &pid);
2323
if(res < 0) {
2424
ocmd->header.header.status = -ENOENT;
25-
luxSendDependency(ocmd);
25+
luxSendKernel(ocmd);
2626
return;
2727
}
2828

2929
if(res & RESOLVE_DIRECTORY) {
3030
ocmd->header.header.status = -EISDIR;
31-
luxSendDependency(ocmd);
31+
luxSendKernel(ocmd);
3232
return;
3333
}
3434

@@ -37,7 +37,7 @@ void procfsOpen(OpenCommand *ocmd) {
3737
else
3838
ocmd->header.header.status = 0;
3939

40-
luxSendDependency(ocmd);
40+
luxSendKernel(ocmd);
4141
}
4242

4343
void procfsStat(StatCommand *scmd) {
@@ -48,7 +48,7 @@ void procfsStat(StatCommand *scmd) {
4848
int res = resolve(scmd->path, &pid);
4949
if(res < 0) {
5050
scmd->header.header.status = -ENOENT;
51-
luxSendDependency(scmd);
51+
luxSendKernel(scmd);
5252
return;
5353
}
5454

@@ -62,7 +62,7 @@ void procfsStat(StatCommand *scmd) {
6262
else if(res == RESOLVE_CPU) scmd->buffer.st_size = strlen(sysinfo->cpu);
6363
else scmd->buffer.st_size = 8;
6464

65-
luxSendDependency(scmd);
65+
luxSendKernel(scmd);
6666
}
6767

6868
void procfsRead(RWCommand *rcmd) {
@@ -73,15 +73,15 @@ void procfsRead(RWCommand *rcmd) {
7373
int file = resolve(rcmd->path, &pid);
7474
if(file < 0) {
7575
rcmd->header.header.status = -ENOENT;
76-
luxSendDependency(rcmd);
76+
luxSendKernel(rcmd);
7777
return;
7878
}
7979

8080
RWCommand *res = calloc(1, sizeof(RWCommand) + rcmd->length);
8181
if(!res) {
8282
rcmd->header.header.status = -ENOMEM;
8383
rcmd->length = 0;
84-
luxSendDependency(rcmd);
84+
luxSendKernel(rcmd);
8585
return;
8686
}
8787

@@ -117,15 +117,15 @@ void procfsRead(RWCommand *rcmd) {
117117
default:
118118
rcmd->header.header.status = -ENOENT;
119119
rcmd->length = 0;
120-
luxSendDependency(rcmd);
120+
luxSendKernel(rcmd);
121121
free(res);
122122
return;
123123
}
124124

125125
if(rcmd->position >= size) {
126126
rcmd->header.header.status = -EOVERFLOW;
127127
rcmd->length = 0;
128-
luxSendDependency(rcmd);
128+
luxSendKernel(rcmd);
129129
free(res);
130130
return;
131131
}
@@ -139,6 +139,6 @@ void procfsRead(RWCommand *rcmd) {
139139
res->header.header.status = truelen;
140140
res->header.header.length += truelen;
141141
res->position += truelen;
142-
luxSendDependency(res);
142+
luxSendKernel(res);
143143
free(res);
144144
}

0 commit comments

Comments
 (0)