Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
wine
wine-cw
Commits
227a0894
Commit
227a0894
authored
Apr 08, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed a number of global handle allocations and critical section
initializations.
parent
11342151
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
13 additions
and
72 deletions
+13
-72
changenotify.c
dlls/shell32/changenotify.c
+4
-9
iconcache.c
dlls/shell32/iconcache.c
+1
-4
user_main.c
dlls/user/user_main.c
+0
-7
x11drv_main.c
dlls/x11drv/x11drv_main.c
+0
-4
profile.c
files/profile.c
+1
-5
xfont.c
graphics/x11drv/xfont.c
+1
-4
cursoricon.h
include/cursoricon.h
+0
-2
message.h
include/message.h
+0
-1
module.c
loader/ne/module.c
+0
-3
heap.c
memory/heap.c
+1
-4
sysdeps.c
scheduler/sysdeps.c
+1
-1
syslevel.c
scheduler/syslevel.c
+0
-1
cursoricon.c
windows/cursoricon.c
+1
-10
timer.c
windows/timer.c
+1
-15
event.c
windows/x11drv/event.c
+2
-2
No files found.
dlls/shell32/changenotify.c
View file @
227a0894
...
...
@@ -13,9 +13,9 @@
#include "winversion.h"
#include "wine/undocshell.h"
DEFAULT_DEBUG_CHANNEL
(
shell
)
DEFAULT_DEBUG_CHANNEL
(
shell
)
;
static
CRITICAL_SECTION
SHELL32_ChangenotifyCS
;
static
CRITICAL_SECTION
SHELL32_ChangenotifyCS
=
CRITICAL_SECTION_INIT
;
/* internal list of notification clients (internal) */
typedef
struct
_NOTIFICATIONLIST
...
...
@@ -30,17 +30,12 @@ typedef struct _NOTIFICATIONLIST
DWORD
dwFlags
;
/* client flags */
}
NOTIFICATIONLIST
,
*
LPNOTIFICATIONLIST
;
NOTIFICATIONLIST
head
;
NOTIFICATIONLIST
tail
;
static
NOTIFICATIONLIST
head
;
static
NOTIFICATIONLIST
tail
;
void
InitChangeNotifications
()
{
TRACE
(
"head=%p tail=%p
\n
"
,
&
head
,
&
tail
);
InitializeCriticalSection
(
&
SHELL32_ChangenotifyCS
);
MakeCriticalSectionGlobal
(
&
SHELL32_ChangenotifyCS
);
ZeroMemory
(
&
head
,
sizeof
(
NOTIFICATIONLIST
));
ZeroMemory
(
&
tail
,
sizeof
(
NOTIFICATIONLIST
));
head
.
next
=
&
tail
;
tail
.
prev
=
&
head
;
}
...
...
dlls/shell32/iconcache.c
View file @
227a0894
...
...
@@ -451,7 +451,7 @@ typedef struct
}
SIC_ENTRY
,
*
LPSIC_ENTRY
;
static
HDPA
sic_hdpa
=
0
;
static
CRITICAL_SECTION
SHELL32_SicCS
;
static
CRITICAL_SECTION
SHELL32_SicCS
=
CRITICAL_SECTION_INIT
;
/*****************************************************************************
* SIC_CompareEntrys [called by comctl32.dll]
...
...
@@ -612,9 +612,6 @@ BOOL SIC_Initialize(void)
if
(
sic_hdpa
)
/* already initialized?*/
return
TRUE
;
InitializeCriticalSection
(
&
SHELL32_SicCS
);
MakeCriticalSectionGlobal
(
&
SHELL32_SicCS
);
sic_hdpa
=
pDPA_Create
(
16
);
if
(
!
sic_hdpa
)
...
...
dlls/user/user_main.c
View file @
227a0894
...
...
@@ -7,7 +7,6 @@
#include "winuser.h"
#include "wine/winbase16.h"
#include "cursoricon.h"
#include "dce.h"
#include "dialog.h"
#include "display.h"
...
...
@@ -61,15 +60,9 @@ BOOL WINAPI USER_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
/* Create the DCEs */
DCE_Init
();
/* Initialize timers */
if
(
!
TIMER_Init
())
return
FALSE
;
/* Initialize window procedures */
if
(
!
WINPROC_Init
())
return
FALSE
;
/* Initialize cursor/icons */
CURSORICON_Init
();
/* Initialize built-in window classes */
if
(
!
WIDGETS_Init
())
return
FALSE
;
...
...
dlls/x11drv/x11drv_main.c
View file @
227a0894
...
...
@@ -156,10 +156,6 @@ static void process_attach(void)
CLIPBOARD_Driver
=
&
X11DRV_CLIPBOARD_Driver
;
WND_Driver
=
&
X11DRV_WND_Driver
;
/* We need this before calling any Xlib function */
InitializeCriticalSection
(
&
X11DRV_CritSection
);
MakeCriticalSectionGlobal
(
&
X11DRV_CritSection
);
putenv
(
"XKB_DISABLE="
);
/* Disable XKB extension if present. */
/* Open display */
...
...
files/profile.c
View file @
227a0894
...
...
@@ -81,7 +81,7 @@ static char PROFILE_WineIniUsed[MAX_PATHNAME_LEN] = "";
static
const
WCHAR
wininiW
[]
=
{
'w'
,
'i'
,
'n'
,
'.'
,
'i'
,
'n'
,
'i'
,
0
};
static
CRITICAL_SECTION
PROFILE_CritSect
;
static
CRITICAL_SECTION
PROFILE_CritSect
=
CRITICAL_SECTION_INIT
;
static
const
char
hex
[
16
]
=
"0123456789ABCDEF"
;
...
...
@@ -944,10 +944,6 @@ int PROFILE_LoadWineIni(void)
ERR
(
"Cannot create config registry key
\n
"
);
return
0
;
}
wine_profile_key
=
ConvertToGlobalHandle
(
wine_profile_key
);
InitializeCriticalSection
(
&
PROFILE_CritSect
);
MakeCriticalSectionGlobal
(
&
PROFILE_CritSect
);
if
(
!
CLIENT_IsBootThread
())
return
1
;
/* already loaded */
...
...
graphics/x11drv/xfont.c
View file @
227a0894
...
...
@@ -208,7 +208,7 @@ static fontEncodingTemplate* fETTable = __fETTable;
static
int
DefResolution
=
0
;
static
CRITICAL_SECTION
crtsc_fonts_X11
;
static
CRITICAL_SECTION
crtsc_fonts_X11
=
CRITICAL_SECTION_INIT
;
static
fontResource
*
fontList
=
NULL
;
static
fontObject
*
fontCache
=
NULL
;
/* array */
...
...
@@ -2628,9 +2628,6 @@ BOOL X11DRV_FONT_Init( DeviceCaps* pDevCaps )
XFONT_LoadDefaults
();
XFONT_LoadIgnores
();
InitializeCriticalSection
(
&
crtsc_fonts_X11
);
MakeCriticalSectionGlobal
(
&
crtsc_fonts_X11
);
/* fontList initialization is over, allocate X font cache */
fontCache
=
(
fontObject
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
fontCacheSize
*
sizeof
(
fontObject
));
...
...
include/cursoricon.h
View file @
227a0894
...
...
@@ -70,8 +70,6 @@ typedef struct
#define CID_WIN32 0x0004
#define CID_NONSHARED 0x0008
extern
void
CURSORICON_Init
(
void
);
extern
HCURSOR16
CURSORICON_IconToCursor
(
HICON16
hIcon
,
BOOL
bSemiTransparent
);
...
...
include/message.h
View file @
227a0894
...
...
@@ -19,7 +19,6 @@ extern BOOL MSG_InternalGetMessage( int type, struct tagMSG *msg, HWND hwnd,
WORD
flags
,
BOOL
sendIdle
,
BOOL
*
idleSent
);
/* timer.c */
extern
BOOL
TIMER_Init
(
void
);
extern
void
TIMER_RemoveWindowTimers
(
HWND
hwnd
);
extern
void
TIMER_RemoveQueueTimers
(
HQUEUE16
hqueue
);
extern
BOOL
TIMER_GetTimerMsg
(
struct
tagMSG
*
msg
,
HWND
hwnd
,
...
...
loader/ne/module.c
View file @
227a0894
...
...
@@ -384,9 +384,6 @@ HANDLE NE_OpenFile( NE_MODULE *pModule )
if
((
cachedfd
=
CreateFileA
(
name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
-
1
))
==
-
1
)
MESSAGE
(
"Can't open file '%s' for module %04x
\n
"
,
name
,
pModule
->
self
);
else
/* FIXME: should not be necessary */
cachedfd
=
ConvertToGlobalHandle
(
cachedfd
);
TRACE
(
"opened '%s' -> %d
\n
"
,
name
,
cachedfd
);
return
cachedfd
;
...
...
memory/heap.c
View file @
227a0894
...
...
@@ -535,10 +535,7 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
/* Initialize critical section */
InitializeCriticalSection
(
&
heap
->
critSection
);
/* FIXME: once separate address spaces are implemented, only */
/* the SystemHeap critical section should be global */
/* if (!SystemHeap) */
MakeCriticalSectionGlobal
(
&
heap
->
critSection
);
if
(
!
SystemHeap
)
MakeCriticalSectionGlobal
(
&
heap
->
critSection
);
}
/* Create the first free block */
...
...
scheduler/sysdeps.c
View file @
227a0894
...
...
@@ -36,7 +36,7 @@ static int *ph_errno = &h_errno;
DEFAULT_DEBUG_CHANNEL
(
thread
)
/* Xlib critical section (FIXME: does not belong here) */
CRITICAL_SECTION
X11DRV_CritSection
=
{
0
,
}
;
CRITICAL_SECTION
X11DRV_CritSection
=
CRITICAL_SECTION_INIT
;
#ifdef linux
# ifdef HAVE_SCHED_H
...
...
scheduler/syslevel.c
View file @
227a0894
...
...
@@ -59,7 +59,6 @@ SEGPTR WINAPI GetpWin16Lock16(void)
VOID
WINAPI
_CreateSysLevel
(
SYSLEVEL
*
lock
,
INT
level
)
{
InitializeCriticalSection
(
&
lock
->
crst
);
MakeCriticalSectionGlobal
(
&
lock
->
crst
);
lock
->
level
=
level
;
TRACE
(
"(%p, %d): handle is %d
\n
"
,
...
...
windows/cursoricon.c
View file @
227a0894
...
...
@@ -82,19 +82,10 @@ typedef struct tagICONCACHE
}
ICONCACHE
;
static
ICONCACHE
*
IconAnchor
=
NULL
;
static
CRITICAL_SECTION
IconCrst
;
static
CRITICAL_SECTION
IconCrst
=
CRITICAL_SECTION_INIT
;
static
DWORD
ICON_HOTSPOT
=
0x42424242
;
/**********************************************************************
* CURSORICON_Init
*/
void
CURSORICON_Init
(
void
)
{
InitializeCriticalSection
(
&
IconCrst
);
MakeCriticalSectionGlobal
(
&
IconCrst
);
}
/**********************************************************************
* CURSORICON_FindSharedIcon
*/
static
HANDLE
CURSORICON_FindSharedIcon
(
HMODULE
hModule
,
HRSRC
hRsrc
)
...
...
windows/timer.c
View file @
227a0894
...
...
@@ -37,21 +37,7 @@ typedef struct tagTIMER
static
TIMER
TimersArray
[
NB_TIMERS
];
static
CRITICAL_SECTION
csTimer
;
/***********************************************************************
* TIMER_Init
*
* Initialize critical section for the timer.
*/
BOOL
TIMER_Init
(
void
)
{
InitializeCriticalSection
(
&
csTimer
);
MakeCriticalSectionGlobal
(
&
csTimer
);
return
TRUE
;
}
static
CRITICAL_SECTION
csTimer
=
CRITICAL_SECTION_INIT
;
/***********************************************************************
...
...
windows/x11drv/event.c
View file @
227a0894
...
...
@@ -2041,7 +2041,7 @@ int X11DRV_EVENT_PrepareShmCompletion( Drawable dw )
int
n
;
if
(
!
shm_read
)
shm_read
=
ConvertToGlobalHandle
(
FILE_DupUnixHandle
(
ConnectionNumber
(
display
),
GENERIC_READ
|
SYNCHRONIZE
)
);
shm_read
=
FILE_DupUnixHandle
(
ConnectionNumber
(
display
),
GENERIC_READ
|
SYNCHRONIZE
);
for
(
n
=
0
;
n
<
SHM_MAX_Q
;
n
++
)
if
(
!
shm_q
[
n
].
draw
)
...
...
@@ -2055,7 +2055,7 @@ int X11DRV_EVENT_PrepareShmCompletion( Drawable dw )
shm_q
[
n
].
state
=
0
;
if
(
!
shm_q
[
n
].
sema
)
{
shm_q
[
n
].
sema
=
ConvertToGlobalHandle
(
CreateSemaphoreA
(
NULL
,
0
,
256
,
NULL
)
);
shm_q
[
n
].
sema
=
CreateSemaphoreA
(
NULL
,
0
,
256
,
NULL
);
TRACE
(
"Allocated ShmCompletion slots have been increased to %d, new semaphore is %x
\n
"
,
n
+
1
,
shm_q
[
n
].
sema
);
}
...
...
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