Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, December 26, 2013

Add -pthread flag for C++ build in Sublime Text 2

  1. In Sublime Text 2, go to "Preferences -> Browse packages..".
  2. Inside C++ directory, find the "C++.sublime-build" and open it.
  3. Use the following:
    {
     "cmd": ["g++", "${file}", "-pthread","-o", "${file_path}/${file_base_name}"],
     "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
     "working_dir": "${file_path}",
     "selector": "source.c, source.c++",
     "variants":
     [{
    "name": "Run",
    "cmd": ["bash", "-c", "g++ '${file}' -pthread -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
    }]
     }

Wednesday, August 7, 2013

Linux: Kernel programming - Webcam driver

- This project is part of the Linux System programming course @ MTA- 


The project consists from the following parts:
  1. Kernel driver that acts like a web cam driver. 
  2. "Feeder" that feeds frames to the kernel driver.
  3. Frame grabber that grabs frames and display them at NTSC. Manage time/delays using the kernel driver.
  4. Lock reads/writes in the kernel driver using wait queues.