Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Alf-André Walla fwsGonzo

💭
I may be slow to respond.
  • Varnish Software
  • Norway
View GitHub Profile
View chperm.c
#include <stdio.h>
#include <elf.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
View three_segments_lrv64.ld
OUTPUT_FORMAT("elf64-littleriscv", "elf64-littleriscv",
"elf64-littleriscv")
OUTPUT_ARCH(riscv)
ENTRY(_start)
MEMORY
{
progmem (x) : ORIGIN = 0x120000, LENGTH = 500M
rom (r) : ORIGIN = 0x10000000, LENGTH = 1000M
ram (rw) : ORIGIN = 0x20000000, LENGTH = 2000M
}
View threads.cpp
#include <cassert>
#include <cstdio>
#include <pthread.h>
#include <sys/types.h>
#include <stdexcept>
#include <thread> // C++ threads
struct testdata
{
int depth = 0;
View Dockerfile
FROM ubuntu:18.04 as base
RUN apt update
# dm2 dependencies
RUN apt install -y build-essential git cmake gcc-8 g++-8 libglfw3 liblua5.3-dev xorg-dev
# GLEW dependencies
RUN apt install -y libxmu-dev libxi-dev libgl-dev libglu-dev python
RUN git clone https://github.com/nigels-com/glew.git /usr/glew
WORKDIR /usr/glew
View CMakeLists.txt
cmake_minimum_required (VERSION 3.0.2)
project (vmod C)
include(../cmake/vmod.cmake vmod)
add_vmod(vmod_example vmod_example.vcc "Example VMOD"
vmod_example.c
)
vmod_add_tests(vmod_example
tests/vtc01.vtc
)
View t
clang++-7.0 t.cpp -o t
t.cpp:6:13: error: invalid operands to binary expression ('std::ostream'
(aka 'basic_ostream<char>') and 'T')
std::cout << T{} << std::endl;
~~~~~~~~~ ^ ~~~
/usr/lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/system_error:217:5: note:
candidate function not viable: no known conversion from 'T' to 'const std::error_code' for
2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
^
You can’t perform that action at this time.