summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/pnet-newer-libgc-fix.patch
diff options
context:
space:
mode:
authorunmush <[email protected]>2024-11-26 12:44:56 +0200
committerEfraim Flashner <[email protected]>2024-12-22 15:37:33 +0200
commit1b1e9917ad043ac279bd829cd8ac6a842667f648 (patch)
tree2d1352b87a75ef566387a9242907596d1d78cafc /gnu/packages/patches/pnet-newer-libgc-fix.patch
parentf2098a776afff1deb23c5cbcd2c2d80278b9a208 (diff)
gnu: Add pnet-git.
* gnu/packages/dotnet.scm (pnet-git): New variable. * gnu/packages/patches/pnet-fix-line-number-info.patch, gnu/packages/patches/pnet-fix-off-by-one.patch, gnu/packages/patches/pnet-newer-libgc-fix.patch, gnu/packages/patches/pnet-newer-texinfo-fix.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register new patches. Signed-off-by: Efraim Flashner <[email protected]> Change-Id: Ic3e93dbaab24eb73fe9a35f711a710eed6a823a1
Diffstat (limited to 'gnu/packages/patches/pnet-newer-libgc-fix.patch')
-rw-r--r--gnu/packages/patches/pnet-newer-libgc-fix.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/patches/pnet-newer-libgc-fix.patch b/gnu/packages/patches/pnet-newer-libgc-fix.patch
new file mode 100644
index 0000000000..1084b5a5be
--- /dev/null
+++ b/gnu/packages/patches/pnet-newer-libgc-fix.patch
@@ -0,0 +1,45 @@
+diff --git a/support/hb_gc.c b/support/hb_gc.c
+index a5addb2d..41126963 100644
+--- a/support/hb_gc.c
++++ b/support/hb_gc.c
+@@ -104,12 +104,6 @@ static volatile int _FinalizersRunningSynchronously = 0;
+ #define GC_TRACE(a, b)
+ #endif
+
+-/*
+- * This is a internal global variable with the number of reclaimed bytes
+- * after a garbage collection.
+- */
+-extern GC_signed_word GC_bytes_found;
+-
+ /*
+ * Main entry point for the finalizer thread.
+ */
+@@ -432,6 +426,7 @@ int ILGCFullCollection(int timeout)
+ {
+ int lastFinalizingCount;
+ int hasThreads;
++ struct GC_prof_stats_s stats;
+
+ hasThreads = _ILHasThreads();
+
+@@ -462,7 +457,8 @@ int ILGCFullCollection(int timeout)
+ GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount);
+
+ GC_gcollect();
+- bytesCollected = GC_bytes_found;
++ GC_get_prof_stats(&stats, sizeof(stats));
++ bytesCollected = stats.bytes_reclaimed_since_gc;
+
+ GC_TRACE("GC: bytes collected = %i\n", bytesCollected);
+
+@@ -516,7 +512,8 @@ int ILGCFullCollection(int timeout)
+ GC_TRACE("Last finalizingCount = %i\n", lastFinalizingCount);
+
+ GC_gcollect();
+- bytesCollected = GC_bytes_found;
++ GC_get_prof_stats(&stats, sizeof(stats));
++ bytesCollected = stats.bytes_reclaimed_since_gc;
+
+ GC_TRACE("GC: bytes collected = %i\n", bytesCollected);
+