Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106936924
D38345.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
816 B
Referenced Files
None
Subscribers
None
D38345.diff
View Options
diff --git a/lib/libthr/thread/thr_pshared.c b/lib/libthr/thread/thr_pshared.c
--- a/lib/libthr/thread/thr_pshared.c
+++ b/lib/libthr/thread/thr_pshared.c
@@ -213,6 +213,17 @@
_umtx_op(NULL, UMTX_OP_SHM, UMTX_SHM_DESTROY, key, NULL);
}
+static void
+pshared_destroy(struct pthread *curthread, void *key)
+{
+ void *val;
+
+ pshared_wlock(curthread);
+ val = pshared_remove(key);
+ pshared_unlock(curthread);
+ pshared_clean(key, val);
+}
+
void *
__thr_pshared_offpage(void *key, int doalloc)
{
@@ -248,13 +259,9 @@
__thr_pshared_destroy(void *key)
{
struct pthread *curthread;
- void *val;
curthread = _get_curthread();
- pshared_wlock(curthread);
- val = pshared_remove(key);
- pshared_unlock(curthread);
- pshared_clean(key, val);
+ pshared_destroy(curthread, key);
pshared_gc(curthread);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 8, 6:11 PM (1 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15724766
Default Alt Text
D38345.diff (816 B)
Attached To
Mode
D38345: libthr pshared: correct a bug in allocation
Attached
Detach File
Event Timeline
Log In to Comment