FreeBSD Bugzilla – Attachment 218846 Details for
Bug 250311
devel/glib20: lock getfsent() usage to fix x11-fm/thunar crashes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
add lock and cache
g_unix_mount_points_get.patch (text/plain), 1.24 KB, created by
Ivan Rozhuk
on 2020-10-17 22:40:00 UTC
(
hide
)
Description:
add lock and cache
Filename:
MIME Type:
Creator:
Ivan Rozhuk
Created:
2020-10-17 22:40:00 UTC
Size:
1.24 KB
patch
obsolete
>Index: devel/glib20/files/patch-gio_gunixmounts.c >=================================================================== >--- devel/glib20/files/patch-gio_gunixmounts.c (nonexistent) >+++ devel/glib20/files/patch-gio_gunixmounts.c (working copy) >@@ -0,0 +1,33 @@ >+--- gio/gunixmounts.c.orig 2020-10-01 16:17:53.138733000 +0300 >++++ gio/gunixmounts.c 2020-10-18 01:26:30.563084000 +0300 >+@@ -1654,10 +1654,28 @@ >+ GList * >+ g_unix_mount_points_get (guint64 *time_read) >+ { >++ static GList *mnt_pts_last = NULL; >++ static guint64 time_read_last = 0; >++ GList *mnt_pts = NULL; >++ guint64 time_read_now; >++ G_LOCK_DEFINE_STATIC (unix_mount_points); >++ >++ G_LOCK (unix_mount_points); >++ >++ time_read_now = get_mount_points_timestamp (); >++ if (time_read_now != time_read_last || mnt_pts_last == NULL) { >++ time_read_last = time_read_now; >++ g_list_free_full (mnt_pts_last, (GDestroyNotify) g_unix_mount_point_free); >++ mnt_pts_last = _g_get_unix_mount_points (); >++ } >++ mnt_pts = g_list_copy_deep(mnt_pts_last, g_unix_mount_point_copy, NULL); >++ >++ G_UNLOCK (unix_mount_points); >++ >+ if (time_read) >+- *time_read = get_mount_points_timestamp (); >++ *time_read = time_read_last; >+ >+- return _g_get_unix_mount_points (); >++ return mnt_pts; >+ } >+ >+ /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250311
:
218846