Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107164856
D44255.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
974 B
Referenced Files
None
Subscribers
None
D44255.diff
View Options
diff --git a/lib/libc/aarch64/gen/getcontextx.c b/lib/libc/aarch64/gen/getcontextx.c
--- a/lib/libc/aarch64/gen/getcontextx.c
+++ b/lib/libc/aarch64/gen/getcontextx.c
@@ -32,13 +32,26 @@
int
__getcontextx_size(void)
{
+ size_t size;
- return (sizeof(ucontext_t));
+ size = sizeof(ucontext_t);
+ size += sizeof(struct arm64_reg_context); /* Space for ARM64_CTX_END */
+
+ return (size);
}
int
__fillcontextx2(char *ctx)
{
+ struct arm64_reg_context *reg_ctx;
+ ucontext_t *ucp;
+
+ ucp = (ucontext_t *)ctx;
+ ucp->uc_mcontext.mc_ptr = (uint64_t)(ucp + 1);
+
+ reg_ctx = (struct arm64_reg_context *)ucp->uc_mcontext.mc_ptr;
+ reg_ctx->ctx_id = ARM64_CTX_END;
+ reg_ctx->ctx_size = sizeof(struct arm64_reg_context);
return (0);
}
@@ -49,7 +62,10 @@
ucontext_t *ucp;
ucp = (ucontext_t *)ctx;
- return (getcontext(ucp));
+ if (getcontext(ucp) == -1)
+ return (-1);
+ __fillcontextx2(ctx);
+ return (0);
}
__weak_reference(__getcontextx, getcontextx);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 12, 2:57 AM (20 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15760369
Default Alt Text
D44255.diff (974 B)
Attached To
Mode
D44255: libc/aarch64: Add a non-trivial getcontextx
Attached
Detach File
Event Timeline
Log In to Comment