Skip to content

Instantly share code, notes, and snippets.

View kumpera's full-sized avatar

Rodrigo Kumpera kumpera

View GitHub Profile
using System;
using System.Threading;
using System.Runtime.CompilerServices;
class Driver
{
public static ManualResetEvent mre1 = new ManualResetEvent (false);
public static ManualResetEvent mre2 = new ManualResetEvent (false);
class StaticConstructor1
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
class Test {
public virtual void Foo(int arg)
{
Console.WriteLine ("foo {0}", arg);
}
4:02:42] * Assertion: should not be reached at ./sgen-scan-object.h:101
[4:02:42]
[4:02:42]
[4:02:42]
[4:02:42] Native stacktrace:
[4:02:42]
[4:02:42] 0 mono 0x0015d186 mono_handle_native_sigsegv + 342
[4:02:42] 1 mono 0x001ad891 sigabrt_signal_handler + 129
[4:02:42] 2 libsystem_platform.dylib 0x91795deb _sigtramp + 43
[4:02:42] 3 ??? 0xffffffff 0x0 + 4294967295
using System.Reflection;
using System;
using System.Collections.Generic;
namespace DummyApp {
public class TestClass {
readonly List<string> testClassProperty = new List<string> ();
internal List<string> TestClassProperty {
get {
return testClassProperty;
/*
export PATH=/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH
for v7: clang --target=armv7-apple-ios9 -c -O2 -mno-thumb abi.c
for v7k: clang --target=armv7k-apple-ios9 -c -O2 -mno-thumb abi.c
*/
extern void func_d1 (double a);
extern void func_d2(double a, double b);
extern void func_d6(double, double, double, double, double, double);
@kumpera
kumpera / bad_locking.txt
Created March 26, 2015 18:34
Functions that needs locking fixes
Here as the runtime functions that need locking to be adjusted.
There are two categories of locking issues that needs to be addressed:
- Manage allocation while holding a lock
This is bad for performance and is an issue for coop suspend
- Too much stuff done while holding a lock
Locks should only be used to protect data structures. The runtime should
use optimistic initialization everywhere that's possible as it reduces
the surface area of our locking protocol.
using System;
using System.Threading;
using System.Threading.Tasks;
class MainClass {
public static void Main (string [] args)
{
Test ();
}
using System;
using System.Threading;
class T
{
static int threads = 4;
static void thread_start()
{
for (int i = 0; i < 200 * 1000 * 1000; ++i) {
public sealed class My3Attribute : Attribute
{
public My3Attribute (object[] arr) {
}
}
[My3 (new Type[] { typeof (DisappearingType) })]
using System;
using System.IO;
public enum Foo{
a,b,d
}
class Driver {
static void Main ()
{