From 75527fb80bc6f06f7c530bf840ac4a72d9005b84 Mon Sep 17 00:00:00 2001 From: Lysander Mealy Date: Mon, 2 Dec 2024 09:50:21 -0500 Subject: [PATCH] implement `Send + Sync` for `Framebuffer` Fixes #29 --- src/framebuffer.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/framebuffer.rs b/src/framebuffer.rs index 3f05612..7428cd1 100644 --- a/src/framebuffer.rs +++ b/src/framebuffer.rs @@ -1,6 +1,10 @@ //! Auxiliary types for the [framebuffer request](crate::request::FramebufferRequest) -use core::{ffi::c_void, ptr::NonNull}; +use core::{ + ffi::c_void, + marker::{Send, Sync}, + ptr::NonNull, +}; #[derive(Clone, Copy)] #[repr(C)] @@ -186,3 +190,5 @@ impl<'a> Framebuffer<'a> { } } } +unsafe impl Send for Framebuffer {} +unsafe impl Sync for Framebuffer {}