Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
942e6d77
Commit
942e6d77
authored
Dec 30, 1998
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added anonymous pipe support
parent
aa0ebd0f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
1 deletion
+95
-1
Makefile.in
scheduler/Makefile.in
+1
-0
k32obj.c
scheduler/k32obj.c
+2
-1
pipe.c
scheduler/pipe.c
+92
-0
No files found.
scheduler/Makefile.in
View file @
942e6d77
...
...
@@ -12,6 +12,7 @@ C_SRCS = \
handle.c
\
k32obj.c
\
mutex.c
\
pipe.c
\
process.c
\
semaphore.c
\
synchro.c
\
...
...
scheduler/k32obj.c
View file @
942e6d77
...
...
@@ -26,6 +26,7 @@ extern const K32OBJ_OPS SNAPSHOT_Ops;
extern
const
K32OBJ_OPS
SEMAPHORE_Ops
;
extern
const
K32OBJ_OPS
EVENT_Ops
;
extern
const
K32OBJ_OPS
MUTEX_Ops
;
extern
const
K32OBJ_OPS
PIPE_Ops
;
static
const
K32OBJ_OPS
K32OBJ_NullOps
=
{
...
...
@@ -54,7 +55,7 @@ const K32OBJ_OPS * const K32OBJ_Ops[K32OBJ_NBOBJECTS] =
&
MEM_MAPPED_FILE_Ops
,
/* K32OBJ_MEM_MAPPED_FILE */
&
K32OBJ_NullOps
,
/* K32OBJ_SERIAL */
&
DEVICE_Ops
,
/* K32OBJ_DEVICE_IOCTL */
&
K32OBJ_NullOps
,
/* K32OBJ_PIPE */
&
PIPE_Ops
,
/* K32OBJ_PIPE */
&
K32OBJ_NullOps
,
/* K32OBJ_MAILSLOT */
&
K32OBJ_NullOps
,
/* K32OBJ_TOOLHELP_SNAPSHOT */
&
K32OBJ_NullOps
/* K32OBJ_SOCKET */
...
...
scheduler/pipe.c
0 → 100644
View file @
942e6d77
/*
* Win32 pipes
*
* Copyright 1998 Alexandre Julliard
*/
#include <assert.h>
#include "windows.h"
#include "winerror.h"
#include "k32obj.h"
#include "process.h"
#include "thread.h"
#include "heap.h"
#include "server/request.h"
#include "server.h"
typedef
struct
_PIPE
{
K32OBJ
header
;
}
PIPE
;
static
void
PIPE_Destroy
(
K32OBJ
*
obj
);
const
K32OBJ_OPS
PIPE_Ops
=
{
NULL
,
/* signaled */
NULL
,
/* satisfied */
NULL
,
/* add_wait */
NULL
,
/* remove_wait */
NULL
,
/* read */
NULL
,
/* write */
PIPE_Destroy
/* destroy */
};
/***********************************************************************
* CreatePipe (KERNEL32.170)
*/
BOOL32
WINAPI
CreatePipe
(
PHANDLE
hReadPipe
,
PHANDLE
hWritePipe
,
LPSECURITY_ATTRIBUTES
sa
,
DWORD
size
)
{
struct
create_pipe_request
req
;
struct
create_pipe_reply
reply
;
PIPE
*
read_pipe
,
*
write_pipe
;
int
len
;
req
.
inherit
=
(
sa
&&
(
sa
->
nLength
>=
sizeof
(
*
sa
))
&&
sa
->
bInheritHandle
);
CLIENT_SendRequest
(
REQ_CREATE_PIPE
,
-
1
,
1
,
&
req
,
sizeof
(
req
)
);
if
(
CLIENT_WaitReply
(
&
len
,
NULL
,
1
,
&
reply
,
sizeof
(
reply
)
)
!=
ERROR_SUCCESS
)
return
FALSE
;
SYSTEM_LOCK
();
if
(
!
(
read_pipe
=
(
PIPE
*
)
K32OBJ_Create
(
K32OBJ_PIPE
,
sizeof
(
*
read_pipe
),
NULL
,
reply
.
handle_read
,
STANDARD_RIGHTS_REQUIRED
|
SYNCHRONIZE
|
GENERIC_READ
,
sa
,
hReadPipe
)))
{
CLIENT_CloseHandle
(
reply
.
handle_write
);
/* handle_read already closed by K32OBJ_Create */
SYSTEM_UNLOCK
();
return
FALSE
;
}
K32OBJ_DecCount
(
&
read_pipe
->
header
);
if
(
!
(
write_pipe
=
(
PIPE
*
)
K32OBJ_Create
(
K32OBJ_PIPE
,
sizeof
(
*
write_pipe
),
NULL
,
reply
.
handle_write
,
STANDARD_RIGHTS_REQUIRED
|
SYNCHRONIZE
|
GENERIC_WRITE
,
sa
,
hWritePipe
)))
{
CloseHandle
(
*
hReadPipe
);
*
hReadPipe
=
INVALID_HANDLE_VALUE32
;
SYSTEM_UNLOCK
();
return
FALSE
;
}
/* everything OK */
K32OBJ_DecCount
(
&
write_pipe
->
header
);
SetLastError
(
0
);
/* FIXME */
SYSTEM_UNLOCK
();
return
TRUE
;
}
/***********************************************************************
* PIPE_Destroy
*/
static
void
PIPE_Destroy
(
K32OBJ
*
obj
)
{
PIPE
*
pipe
=
(
PIPE
*
)
obj
;
assert
(
obj
->
type
==
K32OBJ_PIPE
);
obj
->
type
=
K32OBJ_UNKNOWN
;
HeapFree
(
SystemHeap
,
0
,
pipe
);
}
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