I'm currently trying to draw a bezier curve using 4 control points. I'm currently drawing the curve using the cubic equation in a for loop where my t value increments by 0.1 each time:
for...
Type: Posts; User: brandon236
I'm currently trying to draw a bezier curve using 4 control points. I'm currently drawing the curve using the cubic equation in a for loop where my t value increments by 0.1 each time:
for...
I actually didn't use that code. The code at the end of my post was given to me as part of the first come first serve algorithm and I added that for loop at the top. I know how priority scheduling...
I'm just trying to figure everything out and it's very confusing. So what I want to happen is I want to know when the task has arrived and when it has arrived I want to insert it into the linked...
So then could I do something like this?
if (tasks[current_tick].arrival_time <= current_tick + 1){
nodes[current_tick].priority = tasks[current_tick].priority;
...
I'm still confused over how to store a task in a linked list. So if a task arrives then I want to put it in my ready queue and place these tasks in the linked list based on their priority number....
I need to implement a non-preemptive priority scheduling in C. I'm having a few problems figuring out how this works. Here's what I have so far:
void priority_scheduling()
{
int...
So in my code, I'm adding and removing items from a bounded buffer and if an item cannot be added or removed then the code waits. This is the wait I'm using for add.
void add_to_buffer(int...
Ok so I found out that operand is not an integer but the address to an integer. So I guess my question is how do I pass in the actual integer instead of the address?
So I'm trying to write a program that adds items to a bounded buffer:
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "bbuffer.h"
With circular buffers, I can see that it's like a queue where if you remove a value, it'll be the first one in the queue. The problem with my implementation is that I'm using a type of stack which...
One last thing. So for removing and adding values, I'm supposed to add them in the next available "in" position and remove them from the next available "out" position. What does that mean? I also...
I'm trying to write a program in C where I remove, add, and initialize a bounded buffer for the consumer/producer problem. Here's what my bounded buffer program looks like:
#include <pthread.h>...