Remove deprecated API

This commit is contained in:
NIIBE Yutaka
2016-05-23 13:00:33 +09:00
parent 5458b77d36
commit ee92bb15b3
4 changed files with 9 additions and 47 deletions

View File

@@ -1,3 +1,8 @@
2016-05-20 NIIBE Yutaka <gniibe@fsij.org>
* chopstx.c (chopstx_usec_wait_var): internal function.
(chopstx_wakeup_usec_wait): Remove.
2016-05-19 NIIBE Yutaka <gniibe@fsij.org> 2016-05-19 NIIBE Yutaka <gniibe@fsij.org>
* VERSION: 0.11. * VERSION: 0.11.

View File

@@ -1115,16 +1115,8 @@ chx_snooze (uint32_t state, uint32_t *usec_p)
return r; return r;
} }
/**
* chopstx_usec_wait_var - Sleep for micro seconds (specified by variable) static void
* @var: Pointer to usec
*
* Sleep for micro seconds, specified by @var.
* Another thread can clear @var to stop the caller going into sleep.
*
* This function is DEPRECATED. Please use chopstx_poll.
*/
void
chopstx_usec_wait_var (uint32_t *var) chopstx_usec_wait_var (uint32_t *var)
{ {
int r = 0; int r = 0;
@@ -1422,11 +1414,11 @@ chx_cond_hook (struct chx_px *px, struct chx_poll_head *pd)
/** /**
* chopstx_claim_irq - Claim interrupt request to handle by this thread * chopstx_claim_irq - Claim interrupt request to handle
* @intr: Pointer to INTR structure * @intr: Pointer to INTR structure
* @irq_num: IRQ Number (hardware specific) * @irq_num: IRQ Number (hardware specific)
* *
* Claim interrupt @intr with @irq_num for this thread. * Claim interrupt @intr with @irq_num
*/ */
void void
chopstx_claim_irq (chopstx_intr_t *intr, uint8_t irq_num) chopstx_claim_irq (chopstx_intr_t *intr, uint8_t irq_num)
@@ -1647,37 +1639,6 @@ chx_join_hook (struct chx_px *px, struct chx_poll_head *pd)
} }
/**
* chopstx_wakeup_usec_wait - wakeup the sleeping thread for timer
* @thd: Thread to be awakened
*
* Canceling the timer, wake up the sleeping thread.
* No return value.
*
* This function is DEPRECATED. Please use chopstx_cond_signal,
* where sleeping process calls chopstx_poll.
*/
void
chopstx_wakeup_usec_wait (chopstx_t thd)
{
struct chx_thread *tp = (struct chx_thread *)thd;
int yield = 0;
chx_cpu_sched_lock ();
if (tp->state == THREAD_WAIT_TIME)
{
((struct chx_stack_regs *)tp->tc.reg[REG_SP])->reg[REG_R0] = 1;
chx_timer_dequeue (tp);
chx_ready_enqueue (tp);
if (tp->prio > running->prio)
yield = 1;
}
if (yield)
chx_sched (CHX_YIELD);
else
chx_cpu_sched_unlock ();
}
/** /**
* chopstx_cancel - request a cancellation to a thread * chopstx_cancel - request a cancellation to a thread
* @thd: Thread to be canceled * @thd: Thread to be canceled

View File

@@ -113,12 +113,8 @@ typedef struct chx_cleanup {
void chopstx_cleanup_push (chopstx_cleanup_t *clp); void chopstx_cleanup_push (chopstx_cleanup_t *clp);
void chopstx_cleanup_pop (int execute); void chopstx_cleanup_pop (int execute);
void chopstx_setpriority (chopstx_prio_t); void chopstx_setpriority (chopstx_prio_t);
void chopstx_usec_wait_var (uint32_t *arg); /* DEPRECATED */
void chopstx_wakeup_usec_wait (chopstx_t thd); /* DEPRECATED */
enum { enum {
CHOPSTX_POLL_COND = 0, CHOPSTX_POLL_COND = 0,
CHOPSTX_POLL_INTR, CHOPSTX_POLL_INTR,