Skip to content

Instantly share code, notes, and snippets.

@msizanoen1
msizanoen1 / lib.rs
Created November 3, 2019 15:31
Remove Windows shadow backup
#[cfg_attr(not(windows), allow(unused_imports))]
use std::ffi::OsString;
#[cfg(not(windows))]
pub fn ensure() {}
#[cfg(windows)]
fn all_volumes() -> Vec<OsString> {
use std::os::windows::prelude::*;
use winapi::shared::minwindef;
@msizanoen1
msizanoen1 / main.c
Last active October 6, 2019 08:13
Android pthread TLS repro
#include <stdio.h>
#include <pthread.h>
#include <malloc.h>
pthread_key_t key;
extern int getX();
int main() {
key = pthread_key_create(&key, NULL);
int *x = (int *)malloc(sizeof(int));
pthread_setspecific(key, x);