This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt install vim unzip make gcc clang binutils-dev qemu-system-x86 fzf cgdb python wget git autotools-dev automake flex texinfo libreadline6-dev | |
/test/test/group0-master/src/utils/pintos-gdb: | |
GDBMACROS=/test/test/group0-master/src/misc/gdb-macros | |
upgrage cgdb | |
OK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <sys/epoll.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
class Timer | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
#include <algorithm> | |
#include <sys/epoll.h> | |
#include <sys/time.h> | |
#include <unistd.h> | |
#include <queue> | |
#include <vector> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <event2/event.h> | |
#define BUF_SIZE 1024 | |
void onError(const char *reason) | |
{ | |
perror(reason); | |
exit(EXIT_FAILURE); | |
} | |
void read_cb(int fd,short events,void* arg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <event2/event.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#define BUF_SIZE 1024 | |
void onError(const char *reason) | |
{ | |
perror(reason); | |
exit(EXIT_FAILURE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version = 6.2.4 | |
THREADS = 4 | |
HOST_OS = MINGW32 | |
JANSSONDIR = jansson-2.11 | |
LIBEVENTDIR = libevent-2.1.8-stable | |
LIBSEARPCDIR = libsearpc-3.1-latest | |
SEAFILEDIR = seafile-$(version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Install dependent library ..." | |
libs=(sed git mingw32-curl intltool vala libtool automake make cmake \ | |
mingw32-qt5-qtbase-devel mingw32-qt5-qttools-tools mingw32-pkg-config \ | |
unzip libuuid-devel libcurl-devel openssl-devel qt5-qtbase-devel \ | |
make qt5-qttools-devel doxygen wget sqlite-devel mingw32-qt5-qttools \ | |
mingw32-qt5-qmake) | |
sudo dnf install ${libs[@]} -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @Author: baixiangcpp@gmail.com | |
* @Date: 2018-07-28 11:04:52 | |
* @Last Modified by: baixiangcpp@gmail.com | |
* @Last Modified time: 2018-07-28 11:07:04 | |
* @usage: An implementation of reactor design patterns base on epoll. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/epoll.h> | |
#include <sys/socket.h> | |
#include <fcntl.h> | |
#include <strings.h> | |
#include <errno.h> | |
#include <netinet/in.h> |