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
make -C /lib/modules/3.2.0-38-generic/build M=/home/tyh25/cs370/sources/cs370/tar/module modules | |
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-38-generic' | |
CC [M] /home/tyh25/cs370/sources/cs370/tar/module/tarfs.o | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c: In function ‘add_tarfs_instance’: | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c:83:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c: In function ‘tarfs_read_file’: | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c:173:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c:189:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c:192:15: warning: initialization from incompatible pointer type [enabled by default] | |
/home/tyh25/cs370/sources/cs370/tar/module/tarfs.c: In function |
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 <unistd.h> | |
int main(int argc, char *argv[]) { | |
int status; | |
int parent_pid = getpid(); | |
int child_pid = fork(); | |
if(!child_pid) { // If Child | |
printf("child\n"); | |
char * send_buffer; |
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
//Custom message struct | |
struct mymsg | |
{ | |
//Data for this message | |
char * msg_data; | |
//Length of the data | |
int data_length; | |
//Sending pid | |
pid_t origin_pid; |
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
var y; | |
y = 4; |
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
/** | |
* From Bullet.cpp | |
*/ | |
//Creates the bullet | |
Bullet::Bullet() { | |
setPosition(100,100); | |
setDirection(NORTH); | |
setHealth(1); | |
setMovementRate(10); | |
setWidth(5); |
NewerOlder