Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
615ceb3b
Commit
615ceb3b
authored
Aug 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Rename winetest thread data struct and getter.
parent
58ec7775
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
test.h
include/wine/test.h
+18
-18
No files found.
include/wine/test.h
View file @
615ceb3b
...
...
@@ -203,7 +203,7 @@ static LONG winetest_muted_todo_successes; /* same as todo_successes but silent
static
LONG
line_counters
[
16384
];
/* The following data must be kept track of on a per-thread basis */
struct
tls
_data
struct
winetest_thread
_data
{
const
char
*
current_file
;
/* file of current check */
int
current_line
;
/* line of current check */
...
...
@@ -218,9 +218,9 @@ struct tls_data
};
static
DWORD
tls_index
;
static
struct
tls_data
*
get_tls
_data
(
void
)
static
struct
winetest_thread_data
*
winetest_get_thread
_data
(
void
)
{
struct
tls
_data
*
data
;
struct
winetest_thread
_data
*
data
;
DWORD
last_error
;
last_error
=
GetLastError
();
...
...
@@ -244,7 +244,7 @@ static void exit_process( int code )
void
winetest_set_location
(
const
char
*
file
,
int
line
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
data
->
current_file
=
strrchr
(
file
,
'/'
);
if
(
data
->
current_file
==
NULL
)
data
->
current_file
=
strrchr
(
file
,
'\\'
);
...
...
@@ -276,7 +276,7 @@ static const char color_bright_purple[] = "\x1b[1;95m";
static
void
winetest_printf
(
const
char
*
msg
,
...
)
__WINE_PRINTF_ATTR
(
1
,
2
);
static
void
winetest_printf
(
const
char
*
msg
,
...
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
va_list
valist
;
printf
(
"%s:%d:%s "
,
data
->
current_file
,
data
->
current_line
,
winetest_elapsed
()
);
...
...
@@ -286,7 +286,7 @@ static void winetest_printf( const char *msg, ... )
}
static
void
winetest_print_context
(
const
char
*
msgtype
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
unsigned
int
i
;
winetest_printf
(
"%s"
,
msgtype
);
...
...
@@ -333,13 +333,13 @@ int broken( int condition )
static
LONG
winetest_add_line
(
void
)
{
struct
tls
_data
*
data
;
struct
winetest_thread
_data
*
data
;
int
index
,
count
;
if
(
winetest_debug
>
1
)
return
0
;
data
=
get_tls
_data
();
data
=
winetest_get_thread
_data
();
index
=
data
->
current_line
%
ARRAY_SIZE
(
line_counters
);
count
=
InterlockedIncrement
(
line_counters
+
index
)
-
1
;
if
(
count
==
winetest_mute_threshold
)
...
...
@@ -364,7 +364,7 @@ static LONG winetest_add_line( void )
*/
int
winetest_vok
(
int
condition
,
const
char
*
msg
,
va_list
args
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
if
(
data
->
todo_level
)
{
...
...
@@ -512,14 +512,14 @@ void winetest_win_skip( const char *msg, ... )
void
winetest_start_flaky
(
int
is_flaky
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
data
->
flaky_level
=
(
data
->
flaky_level
<<
1
)
|
(
is_flaky
!=
0
);
data
->
flaky_do_loop
=
1
;
}
int
winetest_loop_flaky
(
void
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
int
do_flaky
=
data
->
flaky_do_loop
;
data
->
flaky_do_loop
=
0
;
return
do_flaky
;
...
...
@@ -527,20 +527,20 @@ int winetest_loop_flaky(void)
void
winetest_end_flaky
(
void
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
data
->
flaky_level
>>=
1
;
}
void
winetest_start_todo
(
int
is_todo
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
data
->
todo_level
=
(
data
->
todo_level
<<
1
)
|
(
is_todo
!=
0
);
data
->
todo_do_loop
=
1
;
}
int
winetest_loop_todo
(
void
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
int
do_loop
=
data
->
todo_do_loop
;
data
->
todo_do_loop
=
0
;
return
do_loop
;
...
...
@@ -548,13 +548,13 @@ int winetest_loop_todo(void)
void
winetest_end_todo
(
void
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
data
->
todo_level
>>=
1
;
}
void
winetest_push_context
(
const
char
*
fmt
,
...
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
va_list
valist
;
if
(
data
->
context_count
<
ARRAY_SIZE
(
data
->
context
))
...
...
@@ -569,7 +569,7 @@ void winetest_push_context( const char *fmt, ... )
void
winetest_pop_context
(
void
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
if
(
data
->
context_count
)
--
data
->
context_count
;
...
...
@@ -707,7 +707,7 @@ static void usage( const char *argv0 )
/* trap unhandled exceptions */
static
LONG
CALLBACK
exc_filter
(
EXCEPTION_POINTERS
*
ptrs
)
{
struct
tls_data
*
data
=
get_tls
_data
();
struct
winetest_thread_data
*
data
=
winetest_get_thread
_data
();
winetest_print_lock
();
if
(
data
->
current_file
)
...
...
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