background preloader

Code

Facebook Twitter

Search

POSIX Threads Programming. Table of Contents In shared memory multiprocessor architectures, threads can be used to implement parallelism.

POSIX Threads Programming

Historically, hardware vendors have implemented their own proprietary versions of threads, making portability a concern for software developers. For UNIX systems, a standardized C language threads programming interface has been specified by the IEEE POSIX 1003.1c standard. Implementations that adhere to this standard are referred to as POSIX threads, or Pthreads. The tutorial begins with an introduction to concepts, motivations, and design considerations for using Pthreads. Level/Prerequisites: This tutorial is ideal for those who are new to parallel programming with pthreads. What is a Thread? Technically, a thread is defined as an independent stream of instructions that can be scheduled to run as such by the operating system.

What are Pthreads? Historically, hardware vendors have implemented their own proprietary versions of threads. Why Pthreads? Light Weight: Thread-safeness: Code Documentation via reddit.com. Contributing to Open Source Projects HOWTO. This page is aimed at programmers new to the Open Source / Free Software world, who want to make a contribution, but aren't sure where to start.

Contributing to Open Source Projects HOWTO

The latest version of this document is at www.kegel.com/academy/opensource.html. Contents Triage Triage is the fine art of looking at bug reports from users, deciding if they're repeatable, and if so, passing the proper information on to the developers. This is a great way to get familiar with a project, and to earn karma points. Patches Most open source projects work like this: all the developers have their own (not quite identical) copies of the source code.

Making Patches To create a patch, you run a program called diff, and save its output to a file. Diff -Naur foobar.old foobar.new > blarg.patch will create the file 'blarg.patch' containing your changes in 'unified context diff' format. To maximize the likelihood that other developers will bless your patch, review your patch line by line to verify that there are no extra changes included.

Mike Vanier: opinions. If you're going to send me email comments about this article, please keep a few things in mind: I wrote this article a long time ago (in 2001, if memory serves), and frankly I'm not that interested in discussing it anymore.

Mike Vanier: opinions

These days I'd rather write programs and teach programming languages than write opinion pieces. The article accurately reflects my opinions as of the time I wrote it, but may not accurately reflect my current opinions. I didn't post this article to reddit.com or to any other site. I have no interest in drumming up traffic to this page. I've received some surprisingly hostile emails from people who disagree with me. The Original Essay Almost all programming competitions have the same format. Here are my objections to (most) programming competitions as they currently exist: Fast programming isn't the same as good programming People who can write mostly-correct code very fast.People who can write absolutely correct code more slowly. Hey Proggit, here's a wiki for useful code snippets. Enjoy. via reddit.com. ICFP Contest 2008. (Browse or download the code at So, I just finished sleeping off a "double all-nighter" for the ICFP Programming Contest.

ICFP Contest 2008

The task this year was to write a controller for a Mars rover. The program would connect to a server which would send it periodic telemetry updates and then it would send back instructions, either Accelerate, Brake, Left, or Right. I had tried to get a team together for this contest, but it was apparently a busy weekend and all my programmer friends had other plans. After thinking about the problem (and my situation as a solo entry) for a few minutes, I decided it would be interesting to see if I could write it in TeX. Initial Work The first problem that arose immediately after I decided on TeX was that TeX has no network access. With a different number of mostly-numerical arguments depending on which letter came first (this determined what kind of datum it was). Math An inverse heisenbug Collision avoidance. Software Developer - The Software Developer Industry's Web Resource.