Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
dc95f565
Commit
dc95f565
authored
Mar 14, 2001
by
heikki@donna.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
os0thread.c Use pthread_attr_init instead of ..._create
parent
732d702f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
innobase/os/os0thread.c
innobase/os/os0thread.c
+15
-1
No files found.
innobase/os/os0thread.c
View file @
dc95f565
...
@@ -26,7 +26,16 @@ os_thread_get_curr_id(void)
...
@@ -26,7 +26,16 @@ os_thread_get_curr_id(void)
#ifdef __WIN__
#ifdef __WIN__
return
(
GetCurrentThreadId
());
return
(
GetCurrentThreadId
());
#else
#else
return
((
os_thread_id_t
)
pthread_self
());
pthread_t
pthr
;
pthr
=
pthread_self
();
/* TODO: in the future we have to change os_thread_id
to pthread_t; the following cast may work in a wrong way on some
systems if pthread_t is a struct; this is just a quick fix
for HP-UX to eliminate a compiler warning */
return
(
*
(
os_thread_id_t
*
)((
void
*
)
(
&
pthr
)));
#endif
#endif
}
}
...
@@ -65,9 +74,14 @@ os_thread_create(
...
@@ -65,9 +74,14 @@ os_thread_create(
#else
#else
int
ret
;
int
ret
;
os_thread_t
pthread
;
os_thread_t
pthread
;
pthread_attr_t
attr
;
pthread_attr_init
(
&
attr
);
ret
=
pthread_create
(
&
pthread
,
NULL
,
start_f
,
arg
);
ret
=
pthread_create
(
&
pthread
,
NULL
,
start_f
,
arg
);
pthread_attr_destroy
(
&
attr
);
return
(
pthread
);
return
(
pthread
);
#endif
#endif
}
}
...
...
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